1. Re[2]: Benchmark Python vs Euphoria.

------------93EEF53EE0B6D7
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

gb> I would be very interested to see how Java compares to Euphoria in
benchmarks.
  
gb>   I cannot believe how much faster Java has gotten in the
gb> last few years.  The difference between Java and C++ really isn't
gb> that significant now  and Java even beats C++ for raw speed on a
gb> subset of the benchmarks.  Java is already faster than the .NET
gb> platform on nearly all benchmarks.

I'm also interested in this, so I made one. The java source is made as
similar to the Euphoria's sieve.ex (still uses 0 and 1 instead of
false and true, still uses 1-based arrays instead of 0, etc).

And the results are:

> d:\prog\eu-2.5\bin\exwc c:\euphoria\demo\bench\sieve.ex
prime sieve benchmark ...
30816.7 sieves per second
...

> java EuSieve
prime sieve benchmark ...
96133.3 sieves per second
...

Java 1.5 is 3x faster than Eu 2.5!

And after that I realized that Eu 2.5 includes a different sieve.ex,
so I made another one.

> d:\prog\eu-2.5\bin\exwc d:\prog\eu-2.5\demo\bench\sieve8k.exw 90000
Prime Sieve Benchmark
Count: 1028
time: 35.32

> java EuSieve2 90000
Prime Sieve Benchmark
Count: 1028
time: 13.75

Java is still 3x faster...

For your reference I attached the java files, with original Eu program
as comments.

BTW, both Java and Eu 2.5 uses bytecodes while running the program,
why do you think Eu is so much slower?
------------93EEF53EE0B6D7
Content-Type: APPLICATION/OCTET-STREAM; name="EuSieve.java"

new topic     » topic index » view message » categorize

2. Re: Re[2]: Benchmark Python vs Euphoria.

akusaya wrote:

> I'm also interested in this, so I made one. The java source is made as
> similar to the Euphoria's sieve.ex (still uses 0 and 1 instead of
> false and true, still uses 1-based arrays instead of 0, etc).

> And the results are:

>> d:\prog\eu-2.5\bin\exwc c:\euphoria\demo\bench\sieve.ex
> prime sieve benchmark ...
> 30816.7 sieves per second
> ...

>> java EuSieve
> prime sieve benchmark ...
> 96133.3 sieves per second
> ...

> Java 1.5 is 3x faster than Eu 2.5!

> And after that I realized that Eu 2.5 includes a different sieve.ex,
> so I made another one.

>> d:\prog\eu-2.5\bin\exwc d:\prog\eu-2.5\demo\bench\sieve8k.exw 90000
> Prime Sieve Benchmark
> Count: 1028
> time: 35.32

>> java EuSieve2 90000
> Prime Sieve Benchmark
> Count: 1028
> time: 13.75

> Java is still 3x faster...

> For your reference I attached the java files, with original Eu program
> as comments.

> BTW, both Java and Eu 2.5 uses bytecodes while running the program,
> why do you think Eu is so much slower?

It doesn't just stop with sieve either... Java beats Euphoria with heapsort,
fibonacci, and ackermann too.

http://centrin.net.id/~marc/performance.html


Regards,
Vincent

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

3. Re: Re[2]: Benchmark Python vs Euphoria.

Is that with JIT compiling?

Edmund Burke: "All that is necessary for evil to triumph is for good men to do
nothing."

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

4. Re: Re[2]: Benchmark Python vs Euphoria.

akusaya wrote:
> BTW, both Java and Eu 2.5 uses bytecodes while running the program,
> why do you think Eu is so much slower?

Java is a compiler (JIT). It doesn't execute bytes codes.
It compiles down to machine code.
Euphoria is an interpreter.
You might want to compare instead against the 
Euphoria To C Translator.
You might also want to measure the memory
used by Java, and the start-up time.

Also, Java cheats on things like integer overflow,
and uninitialized variable checking, and I think some
subscript checking is not performed when Java doesn't
know the size of a dimension of an array. Also Java
does not have the same, easy, flexible, totally transparent 
dynamic storage allocation that Euphoria has. 
They also made mistakes in implementing multithreading,
and now there are a bunch of "deprecated" multithreading
functions that you are not supposed to use.

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

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

5. Re: Re[2]: Benchmark Python vs Euphoria.

Robert Craig wrote:
> 
> akusaya wrote:
> > BTW, both Java and Eu 2.5 uses bytecodes while running the program,
> > why do you think Eu is so much slower?
> 
> Java is a compiler (JIT). It doesn't execute bytes codes.
> It compiles down to machine code.
> Euphoria is an interpreter.
> You might want to compare instead against the 
> Euphoria To C Translator.
> You might also want to measure the memory
> used by Java, and the start-up time.
> 
> Also, Java cheats on things like integer overflow,
> and uninitialized variable checking, and I think some
> subscript checking is not performed when Java doesn't
> know the size of a dimension of an array. Also Java
> does not have the same, easy, flexible, totally transparent 
> dynamic storage allocation that Euphoria has. 
> They also made mistakes in implementing multithreading,
> and now there are a bunch of "deprecated" multithreading
> functions that you are not supposed to use.
> 
> Regards,
>    Rob Craig
>    Rapid Deployment Software
>    <a href="http://www.RapidEuphoria.com">http://www.RapidEuphoria.com</a>

Hi

I'll stick with Euphoria, because I love the language, its simplicity, ease 
of use, and speed for my needs. If I want to write fast FPS shooters, I'm
sure that another language would be more suited anyway - I don't btw.

But - I'll bet that there are a fair few poeple out there who say that Java
is faster, and who cares if it cheats - its the end results that matter, not
the tool that get the end results.

eg a beautiful spanner undoes a nut, but a really ugly rusty one does it 3
times faster - which one would you choose.

Bottom line - if you need to cheat to make eu faster, then cheat.

Chris

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

6. Re: Re[2]: Benchmark Python vs Euphoria.

Hi.

First of all I don't want to start a language war.
Then I'm not saying that language A is better than language B.
If it fits your needs, just keep it.
My vision is that Eu provides nicely what I need: an easy way to 
write relatively clean moderately sized programs. Mainly simulations.
Comparing a JIT language with a purely interpreted one is not very full of
sense.
I agree with Robert that you shall take in considaration also the memory
footprint
and the time for starting. What I say is that from all the interpreted languages
I know (call them scripting ones if that's more fashionable) EU is the fastest.
Point.
If we talk about compiled languages that's another story. As an example, I like
very much Pascal (even in its object form blink and I'm not sure that if you
compare the total time needed to compile a module in Turbo Pascal or in Free
Pascal
plus it's execution time with the time needed to 'compile' and execute some Java
code the
result will be in favor of Java. 
I'll plan to compare later on Eu with Oberon in it's byte code interpreted form.
That's more comparable even if I think that Oberon is a bit cleaner than Eu. 
I'll let you know.
Anyway, don't forget that this kind of exercise is usually just for fun. Don't
fight blink

Have a nice day.

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

7. Re: Re[2]: Benchmark Python vs Euphoria.

ChrisBurch2 wrote:

> Hi
> 
> I'll stick with Euphoria, because I love the language, its simplicity, ease
> 
> of use, and speed for my needs. If I want to write fast FPS shooters, I'm
> sure that another language would be more suited anyway - I don't btw.
> 
> But - I'll bet that there are a fair few poeple out there who say that Java
> is faster, and who cares if it cheats - its the end results that matter, not
> the tool that get the end results.
> 
> eg a beautiful spanner undoes a nut, but a really ugly rusty one does it 3
> times faster - which one would you choose.
> 
> Bottom line - if you need to cheat to make eu faster, then cheat.
> 
> Chris

I completely agree. But it isn't fair to compare an interpreted to a fast
compiler or JIT. I recall even Qu is slightly faster than Euphoria when their JIT
compiler option is used. Even the fastest interpreted languages (like Euphoria)
cannot stack against most optimizing JIT/compilers. The Java HotSpot virtual
machine seems to be an interpreter and JIT hybrid.

To make things fair you can use the Euphoria to C translator that could increase
overall performance upto five times. This is the way to go when releasing
closed-source applications or libraries.


Regards,
Vincent

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

8. Re: Re[2]: Benchmark Python vs Euphoria.

ChrisBurch2 wrote:
> Bottom line - if you need to cheat to make eu faster, then cheat.
> 
> Chris

You and me, as programmers can think that way. The author of a language can't.
It'd be like a father teaching his son/daughter to cheat and lie in order to take
advantage from others.

JG

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

9. Re: Re[2]: Benchmark Python vs Euphoria.

Julio C. Galaret Viera wrote:
> 
> ChrisBurch2 wrote:
> > Bottom line - if you need to cheat to make eu faster, then cheat.
> > 
> > Chris
> 
> You and me, as programmers can think that way. The author of a language can't.
> It'd be like a father teaching his son/daughter to cheat and lie in order to
> take advantage from others.
> 
> JG

Heh heh

Julio - you are a nice person, however, you've just opened up a huge moralistic
philosophical can of worms, which I'm not getting involved with - oh dammit, just
one thing - a programming language can't make its own moral judgements (or have I
missed yet another function in eu)

with morals


Thats it - I'm stopping now!

Chris


http://members.aol.com/chriscrylex/euphoria.htm
http://uboard.proboards32.com/
http://members.aol.com/chriscrylex/EUSQLite/eusql.html

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

10. Re: Re[2]: Benchmark Python vs Euphoria.

Chris Burch wrote:
> Julio - you are a nice person...

You too.

> }}}
<eucode>
> with morals
> </eucode>
{{{


It was only a metaphor.

JG

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

11. Re: Re[2]: Benchmark Python vs Euphoria.

akusaya wrote:

>> d:\prog\eu-2.5\bin\exwc d:\prog\eu-2.5\demo\bench\sieve8k.exw 90000
> Prime Sieve Benchmark
> Count: 1028
> time: 35.32

>> java EuSieve2 90000
> Prime Sieve Benchmark
> Count: 1028
> time: 13.75
> 
> Java is still 3x faster...

In that test Java is ~2.57x faster than interpreted Euphoria. But when I
translated/compiled it with Open Watcom v1.4, the resulting EXE performed ~3.77x
faster than interpreted Euphoria.

I've translated/compiled programs and seen improvements as much as 4.8x with
DOS/Windows Open Watcom C and 8.2x with Linux/FreeBSD GCC. You can increase speed
even more by using better compiler options in EMAKE!

We'll likely see even more speed improvements with all the v3.0 products!


Regards,
Vincent

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

Search



Quick Links

User menu

Not signed in.

Misc Menu