Hacker News new | ask | show | jobs
by ShroudedNight 3029 days ago
> One of the advantages of looking at C code is that you can actually figure out in your head what the assembly will look like.

One can do this with most C++ too. Though admittedly, non-tree virtual inheritance hierarchies, as well as member function pointers [et al] make this harder to achieve universally. I will also admit that it's easier to do with C.

If the optimizer gets its hands on either though, you may be in for a surprise no matter your choice.

1 comments

C++ extra object copies can sometimes be pretty difficult to see without checking disassembler listing.