Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • new() calls the constructor whereas malloc() doesn't. And it does a few more nice things. Comparing the speed of both is just nonsense. Commented Mar 18, 2014 at 12:20
  • 1
    @scai Sorry to contradict, but that is precisely the reason why I gave the entire signature: I'm not talking about the new keyword, and I'm not even talking about class specific new operators, I'm talking about the one global function that does the allocation itself, and nothing else. This is the function, that you can easily implement by just calling through to malloc(), which is the basis for my measurement. Commented Mar 18, 2014 at 12:29