by olliej · 6y ago · 0 comments
I am tired of people bringing up that instruction as though it's magically making JS faster compared to intel. At best it's a leveling the playing field instruction.
Implementing TSO isn't "cheating", it's hard work that other companies aren't willing to do.
Ref counting isn't magically faster than other GC methods - there's arguments that it is slower - it does however use much less memory than pretty much any other GC scheme, hence the lower memory needs on iOS vs Android.
I think the better argument here is that iOS and MacOS use RC in the underlying objc libs. Having a CPU that works better around that makes sense to increase performance for those particular OSes.
As far as perf the general argument is that dropping the need for refcounting saves time, and that removal also helps caching due to reduced per-object size.
That said I’m not sure if those comparisons are comparing to generational or moving collectors (which are the low latency collectors) because those start needing write barriers.