PDA

View Full Version : Did you know?



DavidP
11-26-2001, 08:28 PM
Did you know that malloc() is actually faster than the "new" keyword? I think it is something like .01%.

Just an interesting thought.

GaPe
12-01-2001, 01:40 PM
Where did you get this information?

Shade
12-07-2001, 04:12 AM
sounds logical!

because malloc just allocates memory, new also calls the constructor _and_ it watches for exceptions to throw

but hey - C++ is slower if you compare it with pure C, but C++ is much saver!!