Hacker News new | past | comments | ask | show | jobs | submit login
Elf in Guile (2014) (wingolog.org)
47 points by mr_tyzik on March 19, 2016 | hide | past | favorite | 7 comments



Does anyone have any benchmarks for guile 2.2 compared to 2.0? I have a lot of small scripts, but for work we use guile as a recursive macro expander for pascal (It was my project, and I like scheme. This was a "first draft" implementation, but stuck and no one could be bothered to rewrite it). That could use a speedup, since for big macros it takes quite some time, and I don't think I can optimize it any more and still be able to read the source.

Edit: so I read the NEWS file in the 2.1.2 branch, and apparently the eval.scm (the interpreter) got 2-3 times faster just by being compiled by the new bytecode compiler. Life is good. I'll compile it in my lunch break tomorrow and see if it works :)


Author describes features from 2.2, which is not out yet. Stable is 2.0.11 and unstable is 2.1.2: ftp://alpha.gnu.org/gnu/guile/

For example, 2.0.11 still uses stack-based bytecode.


How do these features compare to Chicken, which also compiles to native code, if I'm not mistaken?


Chicken compiles to C, which is then compiled to native ELF by C compiler. This ELF can be loaded by OS loader, that is implemented in the kernel. Chicken can produce statically compiled binaries: http://wiki.call-cc.org/man/4/Deployment

Guile does not compile to native code. It compiles to bytecode, which is stored in .rtl-text section of ELF file. It is not native code executed by CPU, but the code for Guile VM. Resulting ELF files can't be loaded by OS, they are loaded by Guile which executes bytecode. The advantage is that object file is portable between architectures, but it depends on Guile loader, which should be installed.


This is from over two years ago and the release still hasn't happened? What's the story behind the story?


Software built in one's free time can take awhile, basically. But Guile 2.2 is in the prerelease phase now, using 2.1.x version numbers. The new compiler and VM are essentially frozen for now. A little more polish and some additional bug fixes and then 2.2 will be released.


Compilers are hard.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: