Bopolissimus Platypus Jr wrote:
(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).
Might be something wrong with your program if PHP is faster by that much. Check the amount of memory your program is using. For memory intensive programs, it might actually be faster to store values on disk as opposed to RAM. If your memory usage is low, try using the QPtrVector class in QT as a test. QT's vector class allows you to pre-allocate the size or number of items in the vector's constructor allowing you to allocate and reuse a big chunk of memory only once. Inspite of this, QT shouldn't run faster than your program since the library is quite big and includes a whole collection of GUI classes. If using QT runs faster, check your vector code or study how QT wrote their vector class to see what the differences are.
-- 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
