-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Paul Eggert on 11/29/2006 11:03 AM: > Eric Blake <[EMAIL PROTECTED]> writes: > >>> See http://tinyurl.com/yd5669 for details. >> This message on the cygwin list has a good point, > > For first-fit memory allocators, perhaps; but these are ancient > technology and I wouldn't worry about x2nrealloc on their account.
Hmm, further reading in that thread from the tinyurl agrees that locking in the ratio is not a good idea if you don't also know the malloc behavior - - one poster reported that performance between 1.3 and 1.6 is one good range (ie. less than the golden ratio phi, but high enough that exponential growth happens in a reasonable amount of time), but that an even better range came as he adjusted the ratio closer to 2.7 (ie. the natural logarithm). Short of some actual benchmarks, which take into account the ability of modern malloc to use MMU to efficiently realloc anything larger than a page size by remapping the memory rather than copying data, I'm becoming more and more reluctant to change away from the current 2.0 ratio without hard evidence, and I'm not willing to spend the time trying to build the benchmark. Perhaps it would make a good thesis paper for some student? - -- Life is short - so eat dessert first! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFblTR84KuGfSFAYARAgiUAJ9l8dduYAL5FuuP2F6WdE7Wy5In6gCgkFc+ k+16BsAG+djA9rqxwB9fskY= =ITfJ -----END PGP SIGNATURE-----