[erlang-questions] Calculate PI in Erlang faster than in Matlab
Thu Apr 3 06:45:58 CEST 2008
thanks for your tests.
It's expected from compiled statically-typed language, like Fortran,C or
Pascal to be faster than dynamic languages.
But I'm sure, that you can't calculate PI with one-liner in Pascal :) OK -
maybe with very very long one-liner.
Are you Free Pascal version uses N=1000000 steps? Maybe you have some
epsilon-optimization, like Jeff suggested before? Can you send me your FP
Thanks in advance,
Jilani Khaldi-2 wrote:
> Zvi wrote:
>> Hi All,
>> I wrote "Migrating to Multi-Core" presentation, where I describe various
>> parallel programming models and APIs. As a practical example, I calculate
>> number using various parallel APIs, such as pthreads, Win32 threads,
>> MPI, Intel TBB and off course plain old serial C code.
>> So I decided to add example in my favorite parallel language - Erlang.
>> code and math description is attached.
> I will have a look at the code later seen I am very interested in
> scientific and technical programming in Erlang. However Vega and Deneb +
> Plain Pascal (Free Pascal Compiler) said:
> Vega (1 CPU Celeron, 512 MB RAM, 2.4 GHZ, Win2K) -> 15 ms
> Deneb (1 CPU Celeron, 256 MB RAM, 300 MHZ, Linux Slack 10.2) -> 127 ms
> Your code on Vega gives:
> 3> c(pi).
> 4> pi:test().
> 5> pi:test().
> And on Deneb it gives:
> T E M A
> erlang-questions mailing list
View this message in context: http://www.nabble.com/Calculate-PI-in-Erlang-faster-than-in-Matlab-tp16440056p16465102.html
Sent from the Erlang Questions mailing list archive at Nabble.com.
More information about the erlang-questions