hello all, i've got a C++ program that does a lot of memory allocation and de-allocation (because i use string and vector a lot, maybe too much). the same program, written in PHP runs many times faster (something like 1 hour in C++ versus around 3 minutes in PHP).
i haven't profiled yet (downloading the data it crunches right now, will profile when it all arrives, i'd rather not profile on the remote box that the program actually runs on since that'll kill performance for the real work that the box is doing). while waiting though, i'd like to ask. can anyone suggest a free (as in beer) alternative C/C++ malloc/free/new/delete library that performs better than the one that comes with gcc? maybe something that keeps and reuses a pool of small blocks of memory for use by, in particular, string. long ago, before STL become a standard (actually, before STL existed and everyone wrote their own string class), i did something like that, pooling string memory for faster access, freeing from the pool when i got desperate. that also saved a lot of memory fragmentation. i'm looking at vmalloc now. i'd appreciate pointers to similar libraries though. hmmm, i might also need to look at STL allocators. in a brief look at those though, i didn't try to use them since i'm lazy and didn't want to spend the time to figure out how they worked. i may, yet. if i don't succumb to more laziness and just use the PHP program :). thanks for any pointers. tiger -- Gerald Timothy Quimpo http://bopolissimus.blogspot.com [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] Public Key: "gpg --keyserver pgp.mit.edu --recv-keys 672F4C78" Mene sakhet ur-seveh -- Philippine Linux Users' Group (PLUG) Mailing List [email protected] (#PLUG @ irc.free.net.ph) Official Website: http://plug.linux.org.ph Searchable Archives: http://marc.free.net.ph . To leave, go to http://lists.q-linux.com/mailman/listinfo/plug . Are you a Linux newbie? To join the newbie list, go to http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie
