1. Benchmark Python vs Euphoria.

From time to time I have the stupid idea to benchmark (from a numeric
 standpoint) euphoria against Python.
I have done that recently with a simple program computing an exponential with a
Taylor development.
That time I have even used a pseudo JIT fot Python named Psyco. 
And the answer is.....Python sucks. I'm not against Python but for the use I do
of scripting (interpreted) languages
I appreciate a resonnable speed for computing. Up to now I haven't fond anything
faster than Euphoria. I'm not talking about
compiled ones of course.

That's all folks.

new topic     » topic index » view message » categorize

2. Re: Benchmark Python vs Euphoria.

Jean-Francois Soucaille wrote:
> 
> 
>  From time to time I have the stupid idea to benchmark (from a numeric
>  standpoint)
> euphoria against Python. 
> I have done that recently with a simple program computing an exponential with
> a Taylor development.
> That time I have even used a pseudo JIT fot Python named Psyco. 
> And the answer is.....Python sucks. I'm not against Python but for the use I
> do of scripting (interpreted) languages 
> I appreciate a resonnable speed for computing. Up to now I haven't fond
> anything
> faster than Euphoria. I'm not talking about 
> compiled ones of course.
> 
> That's all folks.

It would be nice to see some actual numbers, if you could provide some :)

Regards, Alexander Toresson

new topic     » goto parent     » topic index » view message » categorize

3. Re: Benchmark Python vs Euphoria.

On an Athlon32 machine clocked at 1.8 GHz, 1 million iterations of an
exponential
based on a 20 terms development runs in 3s with Euphoria vs. around 20s in
Python,
with or without JIT. 
With Python, loops are 'while' based rather 'for' based for avoiding the range
function overhead.

#####Python code
 
from os import times

t_init=times()
k=1
while k<1000000:
    S=0.
    increment=1.
    x=1.
    n=1
    while n<20:
        S=S+increment
        increment=increment*x/n
        n=n+1
    k=k+1
print S
t_end=times()
print(t_end[1]-t_init[1])

######Euphoria code

include get.e
atom t_init
atom x,delta,sum

t_init=time()
for k=1 to 1000000 do
x=1.0
delta=1.0
sum=1.0

        for i=1 to 20 do
                delta=delta*x/i
                sum+=delta
        end for
end for
atom dummy
printf(1,"%16.14f\n",sum)
printf(1,"%f",time()-t_init)

dummy=wait_key()

Regards

new topic     » goto parent     » topic index » view message » categorize

4. Re: Benchmark Python vs Euphoria.

--0-761502497-1136499124=:1878
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

I would be very interested to see how Java compares to Euphoria in benchmarks.
  
I cannot believe how much faster Java has gotten in the last few years.  The
  difference between Java and C++ really isn't that significant now  and Java even
  beats C++ for raw speed on a subset of the benchmarks.  Java is already faster
  than the .NET platform on nearly all benchmarks.
  
By contrast to C++ whose performance doesn't vary much from year to  year,
  Java is also in full evolution right now - I read that benchmarks  on some
  components of Java 6.0 (the next major release) are nearly 60%  faster than the
  current release.
  
Of course, Java can also be compiled to native code if even greater 
  perfomance is required and you're willing to sacrifice its  cross-platform
  portability smile
  
  Gordon
  
  





From time to time I have the stupid idea to benchmark (from a numeric
 standpoint) euphoria against Python.
I have done that recently with a simple program computing an exponential with a
Taylor development.
That time I have even used a pseudo JIT fot Python named Psyco. 
And the answer is.....Python sucks. I'm not against Python but for the use I do
of scripting (interpreted) languages
I appreciate a resonnable speed for computing. Up to now I haven't fond anything
faster than Euphoria. I'm not talking about
compiled ones of course.

That's all folks.

new topic     » goto parent     » topic index » view message » categorize

5. Re: Benchmark Python vs Euphoria.

On Thu, 05 Jan 2006 15:53:35 -0800, Jean-Francois Soucaille
<guest at RapidEuphoria.com> wrote:

>With Python, loops are 'while' based rather 'for' based for avoiding the range
>function overhead.
While these are most likely "near enough", I somehow doubt they
actually do the same job:
>
>#####Python code
>    S=0.
>    while n<20:
>        S=S+increment
>        increment=increment*x/n
>        n=n+1

>######Euphoria code
>	 sum=1.0
>        for i=1 to 20 do
>                delta=delta*x/i
>                sum+=delta
>        end for

No biggie, I would bet my house on your timings being within 1%, erm
make that 10%, but it is important to be certain to compare like for
like. S/sum start with different values, delta/increment is calculated
before rather than after being added to sum/S, and it looks to me like
the Python loop is one shorter (< rather than <=), though different
start values probably cause the same results to be given.

Yes, I know it doesn't really matter, my apologies for nit-picking.

Regards,
Pete

new topic     » goto parent     » topic index » view message » categorize

6. Re: Benchmark Python vs Euphoria.

Hi Pete.

You're right the two codes are not strictly the same as they haven't been writen
simultanously.
Euphoria one is an old code. I agree that I could improve the similarity. I'll
do it when I'll get
a bit of free time.
Nevertheless I think that the results will not change significantly. If they do,
that will be just
a worst situation for Python as it would show that minor changes lead to huge
differences. (Ok, that could occurs in programming, but usually it's more with
data structures
than by inetrverting just two lines).

I let you know.

Regards

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu