5 ms·
This all seems to indicate that the intel compiler emits multiple, cpu-dependant code paths for a given binary, which seems insane to me due to the amount of ex
by bd_at_rivenhill 13y ago
This all seems to indicate that the intel compiler emits multiple, cpu-dependant code paths for a given binary, which seems insane to me due to the amount of extra memory that this would require. Am I missing something here?
- tbrownaw 13y agoProbably no more insane than loop unrolling, which I understand is fairly standard and well-accepted.
- userbinator 13y agoLoop unrolling is actually becoming somewhat of an outdated technique for modern processors: http://www.agner.org/optimize/blog/read.php?i=142 http://www.agner.org/optimize/blog/read.php?i=142 "It is so important to economize the use of the micro-op cache that I would give the advice never to unroll loops." I don't know how AMD compares.
- wmf 13y agoUsually code isn't that big and maybe these optimizations are only used sparingly so that most of the code is shared.
- deleted 13y ago[deleted]
- stephencanon 13y agoExtra code on disk doesn’t cost anything (well disk space, but that is “free” for practical purposes). A compiler can arrange so that all of the code for a given architecture appeared consecutively in the binary, and then the pages and cachelines containing implementations unused by the processor on which you are running are never loaded into memory / never take up space in the cache. Also, in practice code is a tiny portion of the size of a typical application. Far more space is consumed by resources like images and sounds.
- gonzo 13y agoYou mean "data".