3 ms·
This is sort of contradictory but at the same time as expected speed up on "realistic" code isn't as big it's also easier for JIT compiling VMs to optimize high
by jashmatthews 6y ago
This is sort of contradictory but at the same time as expected speed up on "realistic" code isn't as big it's also easier for JIT compiling VMs to optimize high level abstractions than something like C.
JIT compilers have different optimizations available like:
Fast inlined heap allocation (normally much faster than malloc/free). V8 even does allocation combining
Transparent ropes for strings
High level alias analysis for hash tables and objects
Inlining dynamic dispatched functions and dynamically loaded functions
- chubot 6y agoDo you have pointers on those? I'd be interested in the rope optimizations, etc.
- jashmatthews 6y agoOff the top of my head something like https://chrisseaton.com/truffleruby/ropes-manlang.pdf https://chrisseaton.com/truffleruby/ropes-manlang.pdf https://static.googleusercontent.com/media/research.google.com/en//pubs/archive/42478.pdf https://static.googleusercontent.com/media/research.google.c... https://www.reddit.com/r/programming/comments/wewx2/allocation_sinking_optimization_in_luajit/c5cwg2i/?utm_source=reddit&utm_medium=web2x&context=3 https://www.reddit.com/r/programming/comments/wewx2/allocati...