Hacker News new | ask | show | jobs
by psranga 6131 days ago
Note the comparison is to C, not C++. The runtime improvement came from aggressive inlining.

I'm pretty sure that C++ code (which allows templates, function objects etc) can be written to do the same.

Of course, then we'll get into discussions about whether the C++ code is "idiomatic", requires "wizardry" etc.

The biggest win I see for JIT'd dynamic languages is their ability to optimize across source files. I wish C++ had the capacity to slurp in ALL of a project's C/C++ files and compile it one pass.

In these days of 16G developer desktops, is this an unreasonable demand? :)

1 comments

In fact C++ is usually slower than C because parsing and comprehending it is so damned hard that compiler writers are satisfied when they can get that far.