News for hackers. Stuff that matters.
Re:I translated a simple C program to x86_64 and it was slower by MaxBarraclough on Saturday April 25, 2020 @04:55PM (#22981402)
Any idea what's going on with the mem values in the listing in your second link?

Wouldn't expect a C++ implementation to use 200x the memory of a C implementation. Different algorithms presumably? Or a significant compiler optimisation being missed?

Re:I translated a simple C program to x86_64 and it was slower by heeen2 on Sunday April 26, 2020 @05:37AM (#22985866)
Maybe because the cpp version includes stdlib on top of stdio?
Re:I translated a simple C program to x86_64 and it was slower by MaxBarraclough on Sunday April 26, 2020 @07:56AM (#22986483)
Ah, of course. So the problem doesn't involve any real allocations, and it's just the language overhead that we're seeing.