Assembler considered cheap
Assembler considered cheap
Posted Apr 15, 2010 1:52 UTC (Thu) by ncm (guest, #165)Parent article: Dispatches from the compiler front
formatting text for a separate assembler and running that assembler are expensive operations
That is frequently asserted forever, but every time it's measured, assembly turns out to cost practically nothing. There might be other valid reasons to skip the assembly stage, but that ain't one of them.
This misperception is an excellent example of how poor even very smart people are at guessing where a computer spends its time, and what will help it do better. Most programs, these days, spend most of their time stalled waiting for cache lines to be copied from main memory. A fast program is one that gets more done between stalls. Keeping useful lines from being kicked out of your caches is among the most productive ways to speed up a program, these days. Another is to get another processor involved in the job. Piping to an assembler in a different process does a bit of both.
The LWN site is currently under high scraper load, so comment display has been suppressed for anonymous users. If you are a human, you may read the comments by clicking the button below:
Note: you can avoid this step in the future by logging into your LWN account.
