3 ms·
what is the advantages of adding bytecode cache?
by claudiug 11y ago
what is the advantages of adding bytecode cache?
- Zash 11y agoIt lets you skip parsing of source code into bytecode if the sources have not changed.
- cpr 11y agoSame as for .pyc -- caches the result of parsing and translating the parse tree into bytecodes.
- FooBarWidget 11y agoIn other words, faster loading times?
- nnq 11y agospeculating: it allows you to still be fine with a slower parser. and this means you can theoretically make the parser smarter (like make it do some inference and catch some bugs at parse-time?) without worrying that much about performance. but then again, I can't imagine what kind of bugs could a parser catch for such a dynamic language like Ruby, so they're probably just doing it to shave some milliseconds from program-start-up time...
- btown 11y agoWith huge libraries (like SpreeCommerce, for instance), startup time can be seconds or more even on recent hardware, and the vast majority of that code isn't changing between runs. So if every gem was cached, they could see radically faster times to load their test suites across their entire organization. It's well worth it even without a smarter parser.