3 ms·
"For some reason we all (especially me) had a mental block about optimization, namely that we always regarded it as a behind-the-scenes activity, to be done in
by AKrumbach 12y ago
"For some reason we all (especially me) had a mental block about optimization, namely that we always regarded it as a behind-the-scenes activity, to be done in the machine language, which the programmer isn't supposed to know. This veil was first lifted from my eyes when I
ran across a remark by Hoare that, ideally, a language should be designed so that an optimizing compiler can describe its optimizations in the source language. Of course!"
That sounds like he wants some sort of homoiconic assembly or machine language to target. Does such a thing even exist?
- justincormack 12y agoSome optimisations can be described in any language (eg dead code elimination). But something that maps 1:1 to LLVM IR would work for pretty much everything.
- avmich 12y ago"Lisp is... a good assembly language because it is possible to write Lisp in a style that directly reflects the operations available on modern computers." Peter Norvig, Paradigms of Artificial Intelligence Programming.