News for hackers. Stuff that matters.
Re:Why Is C Faster Than Java (2009) by tomjen3 on Monday December 27, 2021 @06:07AM (#29701424)
A trivial example: C uses strings that are zero terminated, but which we do not know the length, so it is necessary to count the string length when we need it.

If you implement, say, a Pascal compiler in C, it can be faster than C because Pascal keeps the length of the string with the string.

A language that does not permit pointer arithmetic can optimize the memory layout on the fly, based on real world program performance and that may be faster than a language it is written in.

There are no comments on this comment yet.