Hacker News new | past | comments | ask | show | jobs | submit login

Dynamic languages like lisp are much better suited for jitting. The author acknowledges that most functions do not contain type information of what they return, limiting the amount of optimizations.

Jitting is better suited for handling this type of situation since you can JIT the version of the function for common types with a suitable guard that the input types are what you expected. Thanks to modern branch prediction those guard conditions are essentially free in the common casez and in the slow case you were slow anyways since you haven't jitted that version yet.




This is doubly true of emacs lisp, which is both dynamic in the type sense and dynamic in scope.[0]

Thus one has to guard both against type change, and change in what function a symbol resolves to.

[0] elisp does have lexical scope, but it's bolted-on, reduces performance (at least, used to) and isn't used in the core codebase, which predates it.


Not true, lexical vars are much faster in emacs.


More about this optimization technique: https://en.wikipedia.org/wiki/Inline_caching





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

Search: