3 ms·
JavaScriptCore has used this technique for ~5-6 years now. Reason: some rare cases of interaction between the thread running JS and the JIT or GC threads requi
by pizlonator 4y ago
JavaScriptCore has used this technique for ~5-6 years now.
Reason: some rare cases of interaction between the thread running JS and the JIT or GC threads require somehow locking some of the object’s state. Objects need to be small since adding even one word costs multiple %’s of perf. And there happened to be two bits available in the indexingType byte in the header.
- bremac 4y agoThanks for mentioning this, I couldn't think of where I'd read about this technique before. I was remembering https://webkit.org/blog/6161/locking-in-webkit/ https://webkit.org/blog/6161/locking-in-webkit/