Linked by Hadrien Grasland on Fri 28th Jan 2011 20:37 UTC
OSNews, Generic OSes It's recently been a year since I started working on my pet OS project, and I often end up looking backwards at what I have done, wondering what made things difficult in the beginning. One of my conclusions is that while there's a lot of documentation on OS development from a technical point of view, more should be written about the project management aspect of it. Namely, how to go from a blurry "I want to code an OS" vision to either a precise vision of what you want to achieve, or the decision to stop following this path before you hit a wall. This article series aims at putting those interested in hobby OS development on the right track, while keeping this aspect of things in mind.
Permalink for comment 460204
To read all comments associated with this story, please click here.
RE[8]: Machine language or C
by Alfman on Sun 30th Jan 2011 05:18 UTC in reply to "RE[7]: Machine language or C"
Member since:

"What could the reason be then, why does an open-source compiler fare so poorly against a commercial one?"

Without looking at the assembly, it's just speculation on my part.

I've read that GCC is rather ignorant of code & data locality and cpu cache lines; therefor binary code placement is arbitrary rather than optimal. In theory, this could make a huge difference.

Function inlining is usually good, but only until the cache lines are full, further inlining is detrimental. This may be a weakness for GCC.

The compilers inject prefetch hints into the code, maybe GCC predicts the branches less accurately at compile time?

GLIBC is notoriously bloated. I don't know if intel links in it's own streamlined c library? That might make a difference.

As for compilation time, ICC has an "unfair" advantage. If GCC had been compiled under ICC, then GCC itself might perform much better - though I'm not sure the GCC folks would want to admit to that.

Reply Parent Score: 1