Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

http://www.pvk.ca/Blog/2014/03/15/sbcl-the-ultimate-assembly... SBCL: The Ultimate Assembly Code Breadboard


I think this was on HN earlier too. It's slightly different from what I had in mind, however; generating and then running Asm from Lisp is not quite the same as being able to embed instructions inside any function that manipulate the contents of lists directly, which can be easily done in C/C++.


Here is an example of doing exactly that: http://benchmarksgame.alioth.debian.org/u32/program.php?test...


Note that the C++ is half the code and 6 times as fast. This supports my general impression that you can torture decent performance out of a Lisp compiler, but the result will be ugly, and you'll rarely match C.


I see the ratio as 28.39 sbcl to 10.61 for g++, closer to 3 on the 64 bit version.

At any rate, I was addressing generating and then running Asm from Lisp issue.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: