3 ms·
I'd love to hear from Mozilla how they got the 64bit version to be faster than the 32bit version. The 64bit versions of apps tend to have to move more data, du
by kenjackson 15y ago
I'd love to hear from Mozilla how they got the 64bit version to be faster than the 32bit version. The 64bit versions of apps tend to have to move more data, due to the increased address size. The big advantage the 64bit versions tend to have is more registers for apps, but for most real apps the increased memory pressure is a bigger deal.
Looking forward to Mozilla's blog on writing high performance 64bit apps. :-)
- mrsebastian 15y agoYeah, I think that's why its array manipulation performance was slower in the 64-bit version -- but I was very surprised to see that almost everything else was faster. 64-bit web apps... whatever next!
- vasi 15y agox86-64 has many more registers than x86, which can minimize pushing values on the stack, and therefore boosts speed. On 64-bit you can also assume that at least SSE2 is available, which can help optimizations in some cases.
- archangel_one 15y agoI vaguely recall seeing a Mozilla presentation while back saying that they had gone to using 64 bits to store JS variables even on 32-bit machines - this was faster since doubles then fit directly, but presumably on a 64-bit machine it would get faster again. Edit: http://hacks.mozilla.org/2011/03/firefox4-performance/ http://hacks.mozilla.org/2011/03/firefox4-performance/ refers to 64-bit NaN boxing and links to the article I was thinking of, but unfortunately that seems to be broken.
- danwolff 15y ago"NaN-tagging: 64 bit tagged values are used for stack slots and table slots. Unboxed floating-point numbers (doubles) are overlayed with tagged object references. The latter can be distinguished from numbers via the use of special NaNs as tags. It's a remote descendant of pointer-tagging. [The idea dates back to 2006, but I haven't disclosed it before 2008. Special NaNs have been used to overlay pointers before. Others have used it for tagging later on. The specific layout is of my own devising.]" [1] [1] http://article.gmane.org/gmane.comp.lang.lua.general/58908 http://article.gmane.org/gmane.comp.lang.lua.general/58908
- kenjackson 15y agoInteresting, but I don't think I fully understand when you'd use it. Why would you need to couple object references with floating-point values?
- danwolff 15y agoUneducated conjecture: They're not just any floating points, they are doubles. You need twice the capacity of one (32-bit double) in order to fake 64 bits. I assume that this helps meet the requirements of other pieces being hacked together.