Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Thanks 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/




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

Search: