[erlang-questions] Calculate PI in Erlang faster than in Matlab

Jilani Khaldi <>
Wed Apr 2 12:25:46 CEST 2008

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 PI
> number using various parallel APIs, such as pthreads, Win32 threads, OpenMP,
> MPI, Intel TBB and off course plain old serial C code.
> So I decided to add example in my favorite parallel language - Erlang. The
> 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:



More information about the erlang-questions mailing list