Memory RAM usage

grauzone none at example.net
Thu Dec 31 03:06:41 PST 2009


bearophile wrote:
>(I have recently seen a 13X speedup in a not synthetic program just modifying how memory is used and reducing memory usage, keeping the same algorithm. I can show you an URL if you want). 

Yes, please do!

> Do you know how can Free Pascal use so little RAM? Here in this nbody benchmark (a simple N body gravitational simulation) it seems to use less than half of the memory used by C, yet the C code is tight and clean enough, and both use 64 bit floating point numbers:
> http://shootout.alioth.debian.org/u32q/benchmark.php?test=nbody&lang=all&sort=kb
> In other benchmarks memory usage of Free Pascal is not dramatically lower, but it's usually near the top of lower memory usage in all Shootout benchmarks.

No idea. I just know that FPC doesn't use GCC. I think it doesn't even 
link to libc! (I can't really confirm, ldd crashes on the executable 
produced by fpc.) Maybe it just avoids some constant overhead due to this.

> Bye,
> bearophile


More information about the Digitalmars-d-learn mailing list