
64-bit Firefox is the new default on 64-bit Windows - cpeterso
https://blog.mozilla.org/firefox/firefox-64-default-64-bit-windows/
======
trzeci
This is very good news for Emscripten / WebAssembly developers. One of the
main limitation in ASM.js / WASM based applications is a size of emulated
HEAP. It has to be a contiguous memory block, what is so unlikely to allocate
by browser (from my tests it's ~10% of users cannot allocate 256MB for HEAP).
It's that due a memory fragmentation.

Having 64 bit by default fixes such problem. That's a good move. Well done
moz://a

~~~
quazeekotl
It dosen't fix the problem unfortunately, the JIT code in firefox is
effectively 32bit, it can only operate on a 32bit contigious range.

~~~
azakai
It does fix the memory fragmentation problem, in that it's almost guaranteed
you'll have a contiguous range you can allocate (assuming you have enough
memory in the first place). In practice this has been a serious issue.

There is a separate issue of programs that need more than a 32-bit allocation
for their memory. Not many apps hit that limit so far, and it's tricky to
support anyhow since you need 64-bit ints for pointers and JS doesn't support
that well. wasm64 will address this eventually.

------
sannee
I have not really written much of Windows code, so forgive my ignorance but:
What is actually so hard about porting 32-bit -> 64-bit applications on
Windows compared to Linux?

~~~
nikic
Windows is an LLP64 platform, meaning that the "long" type on Windows stays at
32bit even when you're compiling 64bit binaries. Getting 64bit integer support
for PHP on Windows took a major port of all basic type usage to move away from
longs to custom types with a higher degree of control. I don't know whether or
not this was a problem for Firefox or not.

~~~
zeptomu
If you think about it, I think its a little bit a fault of the language (AFAIK
the C specification) defining basic integer types too loose.

What is the advantage of having "int", "long" types that just give _minimum_
byte requirements (with associated storage classes, etc.) instead of more
specified types like int32_t and uint8_t? In the end you deal with fixed-size
integers or not (using some bignum library), but if you deal with them you
have to take their byte length into acount in your code anyway I would say (to
deal with overflows and stuff).

~~~
mjevans
They were that flexible because you'd compile ONE program ONCE for (any
ported) platform and that was that.

It took a little while, but eventually C got
[https://en.wikibooks.org/wiki/C_Programming/stdint.h](https://en.wikibooks.org/wiki/C_Programming/stdint.h)
(in C99 :( ).

~~~
pjmlp
> They were that flexible because you'd compile ONE program ONCE for (any
> ported) platform and that was that.

If it was ever so simple, specially given UB and compiler specific semantics
across all those compilers and operating systems on the 90's (before C was
hardly relevant outside UNIX).

------
tbrock
Holy moly! Is anyone else wondering why this took so long? It's almost 2018
for god sakes. I don't think I've used a 32-bit program in over a decade.

Yeah flash is 32 bit but flash has been dead for the greater part of that
decade. Not sure how it could possibly be the case that moz was still shipping
32-bit Firefox as default until yesterday.

~~~
mrec
Are there slam-dunk arguments why 64-bit is always better _for applications_?
If so, I haven't seen them, and neither have various people I follow who seem
to know what they're talking about.

Example:
[https://blogs.msdn.microsoft.com/ricom/2016/01/11/a-little-6...](https://blogs.msdn.microsoft.com/ricom/2016/01/11/a-little-64-bit-
follow-up/)

~~~
krylon
When our CAD people work on large 3D models, Autodesk Inventor will happily
gobble up 32 GB of RAM, and if they had machines with 64 GB, I suspect it
would make good use of those, too. Also, I am told editing high-res graphics
and video benefit both from the larger address space and the ability to use
more RAM.

But I admit, these are the exception to the rule.

Having used both Linux and Windows in 32 and 64 bit versions - in a few cases
on the same machine -, I did not notice a difference in performance[1]. If the
performance hit due to 64bit is really that substantial, I could imagine the
larger number of registers (and possibly larger caches) make up for that.

[1] Possibly, as so often in the days before SSDs, I/O was enough of a
bottleneck that the difference between 32 and 64 bit code became unnoticeable.

------
kbsletten
What is the crash rate improvement all about? I get the address randomization,
but what changes in 64 that fixed crashes?

~~~
gruez
tab hoarding = hundreds of tabs = more than 3GB memory used = crash (max
userspace memory with large address space aware is 3GB)

~~~
LukeShu
Unless I'm mistaken, the limit for 32-bit processes on 64-bit Windows is
actually 4GB; the 3GB limit is when running on 32-bit Windows.

[https://msdn.microsoft.com/en-
us/library/aa366778.aspx](https://msdn.microsoft.com/en-
us/library/aa366778.aspx)

~~~
user5994461
Only 2 to 3 GB are usable by the application, out of the 4GB addressable
space. The rest is reserved.

~~~
LukeShu
On 32-bit Windows, sure; because the process has to share its 4GB virtual
address space with the system (the system getting the upper 1GB/2GB, depending
on if 4GT is on). But it is my understanding that on 64-bit Windows, 32-bit
processes do not have to share any of their 4GB virtual address space with the
system, and can use the entire 4GB.

[https://msdn.microsoft.com/en-
us/library/aa384271.aspx](https://msdn.microsoft.com/en-
us/library/aa384271.aspx) [https://msdn.microsoft.com/en-
us/library/aa366778.aspx](https://msdn.microsoft.com/en-
us/library/aa366778.aspx)

~~~
cpeterso
Though as noted in your MSDN link, 32-bit Windows application must use the
IMAGE_FILE_LARGE_ADDRESS_AWARE linker flag to opt into a full 4GB virtual
address space when running on 64-bit Windows OS. 32-bit applications that were
only tested on a 32-bit OS might break if they see pointers above 0x80000000
so, in the name of backwards compatibility, Microsoft wisely kept the 2GB
default. :)

~~~
user5994461
>> 2 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE cleared (default)

>> 4 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE set

While we are at it. The flag is a bit in the header of the .exe file. It
should be set at compile time in the visual studio option, but it can be set
into any file really with an hex editor.

Don't expect to be able to use the 4 GB even with the flag. There is a lower
hard cap that depends on the version of windows.

------
bewresu
For a while there I thought Microsoft will ship Firefox as default and halt
their browser efforts altogether.

~~~
astrodust
Edge will go open source before that happens.

~~~
eugeneionesco
Big parts of Edge are already open source.

~~~
astrodust
Exactly my point.

------
__s
> If you prefer to stay with 32-bit Firefox after the 64-bit migration, you
> can simply download and re-run the Firefox 32-bit installer from the Firefox
> platforms and languages download page.

Any reason to do so? It'd have to be some fringe use case of '<4GB RAM system
& user doesn't need fast codecs'. If it's a closed business environment I'd
imagine they're on IE

~~~
cpeterso
The only reason someone would stick with a 32-bit browser is for performance
reasons. 64-bit applications have a larger memory footprint from all the
64-bit code and pointers. We didn't see much performance difference when
testing 2 GB Windows machines hands on, but Firefox telemetry analysis showed
that user retention and crash rates were worse for users with <= 2GB than for
> 2GB. Only about 1% of Firefox Windows users have < 2GB and about 5% have
exactly 2GB.

Users with <= 2GB can still install 64-bit Firefox if they really want to by
downloading the 64-bit full installer instead of the "stub installer" (a tiny
downloader that detects 32- and 64-bit OS and downloads the appropriate full
installer). Likewise users with > 2GB can download the 32-bit full installer,
too. We wanted the Firefox installer's default to provide the best user
experience, but still give users the option to run the (32- or 64-bit)
application of their choice.

For comparison, 64-bit Chrome's minimum memory requirement is >= 4GB.

~~~
ac29
> For comparison, 64-bit Chrome's minimum memory requirement is >= 4GB.

Not officially (there is no memory system requirement):
[https://support.google.com/chrome/a/answer/7100626?hl=en](https://support.google.com/chrome/a/answer/7100626?hl=en)

~~~
cpeterso
When Google announced the migration of 32-bit Chrome Windows users to 64-bit
in May, they used 4GB as a minimum for 64-bit. That Chrome system requirements
page doesn't specify whether there is a minimum memory requirement for 64-bit
Chrome on Windows, but I would assume it is still the same.

[https://chromereleases.googleblog.com/2017/05/stable-
channel...](https://chromereleases.googleblog.com/2017/05/stable-channel-
update-for-desktop.html)

------
baalimago
Now i respect Mozilla and all that they stand for, but that graph is about as
useless as graphs come

~~~
sleepychu
Twice as secure, crashes maybe 1/5th as many times. Totally bizarre choice to
use a graph they could have gone "2X as Secure!" "5X as Stable!"

------
theandrewbailey
Mozilla has come a long way. I remember them turning off the nightly 64-bit
Windows Firefox build[0], then back on[1] after people complained.

[0]
[http://www.computerworld.com/article/2493395/internet/mozill...](http://www.computerworld.com/article/2493395/internet/mozilla-
suspends-work-on-64-bit-firefox-for-windows.html)

[1]
[http://www.computerworld.com/article/2494189/internet/mozill...](http://www.computerworld.com/article/2494189/internet/mozilla-
compromises-on-x64-firefox-after-user-backlash.html)

------
donpdonp
when I read "Firefox 64" [http://dev2017.gamester81.com/wp-
content/uploads/streethoops...](http://dev2017.gamester81.com/wp-
content/uploads/streethoopstarupthumbnail.jpg)

~~~
cpeterso
I helped write this blog post. The early drafts used the term "64-bit Firefox"
but we changed to "Firefox 64-bit" for SEO reasons. Apparently, 10x more
people land on Mozilla's Firefox blog from web searches for "Firefox 64-bit"
than "64-bit Firefox", so the voice of the people won. :)

------
gamedna
Love the unit-less graph around abstract concepts.

[https://xkcd.com/833/](https://xkcd.com/833/)

That said, kudos for making this the default.

------
agumonkey
Firefox 55 feels very near chrome slick on windows (it used to be randomly
laggy). Kudos moz

------
Elmar69
Is this the last "modern browser" to use 64-bit as default?

~~~
Sylos
Well, it's not Chrome which needed the RAM, nor is it Safari that only needs
to support the Mac-ecosystem, nor is it Edge that doesn't need to support
anything prior to Windows 10.

They only just dropped support for XP and Vista in February...

------
maroonmoon
I am not convinced about the stability of 64 bit FF. Even with no add-ons,
stability is poor. Hope it gets fixed as more users start using it and more
crash data shows up.

~~~
sohkamyung
I've been using 64-bit Firefox Nightly for some time with few crashes. The
last time it crashed, I was politely asked (by the Mozilla developers) to do
this:

1\. restart Firefox, enter 'about:crashes' in the URL bar

2\. find the report ID that corresponds to the crash

3\. submit it as part of a bug report to Mozilla's Bugzilla

My crash problem was diagnosed within a day and fixed.

