News for hackers. Stuff that matters.
Re:Firefox 64 built with GCC and Clang by supercilious on Sunday December 16, 2018 @10:24AM (#18693428)
Intel still disables AVX instructions on their low-end Core architecture chips for market segmentation purposes. It is also entirely absent to begin with from their Atom and Celeron chips. AMD did not have AVX support until Ryzen, but they are still selling Piledriver based CPUs on their AM4 platform.

Firefox can't blindly use AVX without checking for its presence or it will crash on these types of systems.

Re:Firefox 64 built with GCC and Clang by karavelov on Sunday December 16, 2018 @11:59AM (#18693859)
AMD Bulldozer and later arch supports AVX, what Ryzen adds is AVX2 instructions.
Re:Firefox 64 built with GCC and Clang by nkurz on Sunday December 16, 2018 @01:05PM (#18694204)
You're right, and this is a little confusing. The article says he's using a "AMD Opteron 6272", which seems like it should support AVX: http://www.cpu-world.com/CPUs/Bulldozer/AMD-Opteron%206272%2.... So maybe the GCC bug he encountered is actually because he lacks AVX2 support? Or an incompatibility between early AMD and Intel support for AVX?
Re:Firefox 64 built with GCC and Clang by vanderZwan on Sunday December 16, 2018 @11:20AM (#18693683)
That doesn't explain GCC's side of the story though

EDIT: I should have clarified, the way the author of the article phrased it at first, I got the impression Clang did better auto-vectorization with Firefox code than GCC.

Re:Firefox 64 built with GCC and Clang by lukeschlather on Sunday December 16, 2018 @11:29AM (#18693721)
The author is trying to figure out why GCC underperforms Clang for Firefox builds. Seems inappropriate to worry about cutting-edge features that probably are available to 10% or so of computers that run Firefox (or a competing browser.)
Re:Firefox 64 built with GCC and Clang by nkurz on Sunday December 16, 2018 @11:45AM (#18693808)
Are you suggesting that 10% is a reasonable estimate of the percentage of Firefox instances running on hardware that supports AVX? I'm not sure of the real numbers but this strikes me as an extremely low estimate.

The closest I can find is Valve's hardware survey, which says that 87% of users are running on computers that support AVX. https://store.steampowered.com/hwsurvey (click on "Other Settings" on the bottom to expand).

Firefox is presumably lower than this, although I don't know by how much. Does Mozilla collect statistics on the capabilities of the computers that Firefox is being run on?

Re:Firefox 64 built with GCC and Clang by froydnj on Monday December 17, 2018 @12:17PM (#18700326)
You can look at https://data.firefox.com/dashboard/hardware for similar numbers. CPU models are not broken out, but you can get a sense of what sort of CPUs are in use by looking at the GPU model: Intel powers 60%+ of the sampled population.
Re:Firefox 64 built with GCC and Clang by vanderZwan on Sunday December 16, 2018 @01:12PM (#18694239)
Well, the author also wrote:

> Moreover GCC -O2 defaults are (in my opinion unfortunately) still not enabling vectorization and unrolling which may have noticeable effects on benchmarks.

... which makes it sound like Clang does a better job at this with Firefox code.