On Tue, Oct 22, 2002 at 01:20:42AM -0700, Terry Lambert wrote:
> The FreeBSD malloc would be lower performance than the Linux malloc,
> if you allocate space in teeny, tiny chunks; it has much higher
> performance for large allocations.  Good programmers allocate their
> resources up front, once, instead of doing the allocations in time
> critical internal loops.

The user may also see a performance gain on Linux if they use a less
stupid allocation scheme.  I ran into some code once that read strings
one character at a time via getc() and did a realloc for each read.
Needless to say, performance was truly awful since a typical run
required parsing over 600MB of text.  I saw a better then 50% speedup on
Alpha Linux when I fixed that mess.

-- Brooks

-- 
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529  9BF0 5D8E 8BE9 F238 1AD4

Attachment: msg37535/pgp00000.pgp
Description: PGP signature

Reply via email to