Defaulting to AVX for 64-bit architectures?

Talk about code development, features, specific bugs, enhancements, patches, and similar things.
Forum rules
Please keep everything here strictly on-topic.
This board is meant for Pale Moon source code development related subjects only like code snippets, patches, specific bugs, git, the repositories, etc.

This is not for tech support! Please do not post tech support questions in the "Development" board!
Please make sure not to use this board for support questions. Please post issues with specific websites, extensions, etc. in the relevant boards for those topics.

Please keep things on-topic as this forum will be used for reference for Pale Moon development. Expect topics that aren't relevant as such to be moved or deleted.

What instruction set should be the minimum for Pale Moon going forward?

Poll ended at 2024-03-09, 15:33

Keep it as-is (SSE2 or later)
18
33%
AVX (Bulldozer/AMD FX/Intel Sandy Bridge)
19
35%
AVX2 (Excavator/Zen/Haswell/Core i3/5/7)
15
27%
Just show me the results
3
5%
 
Total votes: 55

User avatar
UCyborg
Lunatic
Lunatic
Posts: 355
Joined: 2019-01-10, 09:37
Location: Slovenia

Re: Defaulting to AVX for 64-bit architectures?

Unread post by UCyborg » 2024-04-04, 20:55

I never had the impression keeping older hardware operational was mainstream, more like the opposite. People seem to be throwing out older stuff out all the time for the next shiny new thing. It's not a philosophy I live by or something that would make me more content in the long run. It wasn't that long ago (cca. 2 years) when I still drove a 20+ years old car and stored food in a 37+ years old freezing cabinet.

I suppose my current daily driver with AMD Phenom II X4 920 was "modern" when Pale Moon started out. It's extremely reliable and there's no reason for me to replace it, I hardly do anything interesting on the computer these days, so even this one is a bit underutilized. Last year I upgraded its RAM from 4 GB to 6 GB (late to the party after 14 years, LOL) to have some extra breathing space.

I guess it's still covered by 32-bit builds, which were always more responsive on this machine anyway. Though it's not something I notice comparing other browsers of different bitness in general, which indeed seem to be able to get more out of older hardware, when comparing between my machine and something newer of more decent performance class. Eg. there's no reason for me to wish to have eg. AVX build of MS Edge at work while AVX2 build seems to be making positive difference in Pale Moon, but regardless, it remains a rather unfair comparison.

Just my 2 cents. Not that my opinion matters here anyway.

User avatar
Massacre
Fanatic
Fanatic
Posts: 149
Joined: 2020-05-01, 13:16

Re: Defaulting to AVX for 64-bit architectures?

Unread post by Massacre » 2024-04-05, 03:33

suzyne wrote:
2024-04-04, 20:50
People can mention outlier websites that consume a ridiculous amount of memory, but in my use, it is actually very challenging to hit the memory limit of the 32 bit version of Pale Moon.
Try browsing those "infinite scrolls" in Facebook media.

User avatar
suzyne
Astronaut
Astronaut
Posts: 708
Joined: 2023-06-28, 22:43
Location: Australia

Re: Defaulting to AVX for 64-bit architectures?

Unread post by suzyne » 2024-04-05, 06:20

Massacre wrote:
2024-04-05, 03:33
suzyne wrote:
2024-04-04, 20:50
People can mention outlier websites that consume a ridiculous amount of memory, but in my use, it is actually very challenging to hit the memory limit of the 32 bit version of Pale Moon.
Try browsing those "infinite scrolls" in Facebook media.
I haven't meandered through Facebook lately. So I logged in and started scrolling, and scrolling, and scrolling...

You are completely right, it was very easy for me to quickly consume memory! An excellent Pale Moon stress test.

I won't call Facebook an outlier website, so you have proven me wrong about how hard it is to approach the limits. But it did take an unpleasant amount of scrolling and maybe the consumption started to stabilise as Pale Moon approached 3GB?

Image

But point taken, I am abandoning my "32 bits is more than adequate in all cases" assertion.
Laptop 1: Windows 11 64-bit, i7 @ 2.80GHz, 16GB, NVIDIA GeForce MX450.
Laptop 2: Windows 10 32-bit, Atom Z3735F @ 1.33GHz, 2GB, Intel HD Graphics.
Laptop 3: Linux Mint 20.3 64-bit, i5 @ 2.5GHz, 8GB, Intel HD Graphics 620.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37644
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Defaulting to AVX for 64-bit architectures?

Unread post by Moonchild » 2024-04-05, 08:19

suzyne wrote:
2024-04-05, 06:20
But point taken, I am abandoning my "32 bits is more than adequate in all cases" assertion.
It hasn't been the case for years. "infinite scrolling" i.e. mobile-first is literally one of the banes of normal memory use in any browser, because the fact (not opinion) is that your page size will grow and grow and grow in the browser, by definition. We do discard e.g. loaded images and media if out of view under memory pressure, but there's only so much that can be done there.

Also, the truth is you will always be able to find websites (including mainstream ones) that are problematic on Pale Moon, because they will simply be designed and tested on the peculiarities of Blink. That has little to do with AVX or not, though.
Also, building your own 64-bit version of Pale Moon from source is not difficult. We've made the process clear and easy to understand for a reason. Anyone who knows how to read and follow instructions and install some software can do it. So if you want your infinite scrolling Facebook use, you can build 64-bit with whatever optimization you want and use it on old hardware.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Deadgye
Hobby Astronomer
Hobby Astronomer
Posts: 26
Joined: 2020-11-06, 23:59

Re: Defaulting to AVX for 64-bit architectures?

Unread post by Deadgye » 2024-04-05, 14:59

I'd wager that a decent proportion or amount of people on arcane hardware are also the type that don't visit this forum when everything is working great and typically have analytics/telemetry disabled. After all, I myself am on an i7-920, win7 x64, 6x2GB RAM desktop.
I've been meaning to upgrade for a while, but it's mentally stuck behind the 'get a house' task in my todo list. More physical space would make the migration so much easier. And it's not like I wasn't able to put over 100 hours into BG3 last year. (Steam still works, if your curious. But sadly the "Steam will stop running on Windows 7 in # days." counter stopped at 0 instead of going into the negatives.)

Anyway, I'd be sad if I was no longer able to update Pale Moon, as I'm pretty sure it's the only web browser I've actually felt like I wanted to keep up-to-date.

User avatar
marigold
Moonbather
Moonbather
Posts: 53
Joined: 2023-05-26, 17:45

Re: Defaulting to AVX for 64-bit architectures?

Unread post by marigold » 2024-04-05, 16:22

suzyne wrote:
2024-04-04, 20:29
Isn't the Mac version of Pale Moon outside of the official builds?
What I recall is that it started out as an "unofficial" PM build for macOS but since the mac developers couldn't reach an understanding with the lead PM developers on how to work together, it became an "outside" project for a while and was distributed as WhiteStar for sometime ... But due to popular demand the PM leads re-evaluated and found common ground with the mac developers and it is now again distributed under the PM brand, on PM's website. So I am guessing it is now considered an "official" build. (I think the mac developers also work on the FreeBSD builds).
suzyne wrote:
2024-04-04, 20:29
Would that team be allowed to omit the AVX/AVX2 requirement from their version of the browser, or choose to do an extra build if they want?
Then you are back to maintaining and offering multiple builds, in which case my original suggestion is apt - offer "unoptimised" 32-bit and 64-bit builds and a "hardware optimised" 64-bit build.

User avatar
R3n_001
Moonbather
Moonbather
Posts: 67
Joined: 2019-05-25, 20:39

Re: Defaulting to AVX for 64-bit architectures?

Unread post by R3n_001 » 2024-04-05, 16:46

In my tests, I can't see any performance gain going from SSE2 to AVX2. Not in just Pale Moon, I also tested Mercury and Thorium being compiler optimized builds of Firefox and Chromium respectively. Not even software rendering shows a difference. Even forcing a scenario where AVX can't work (7 SP0) there was nothing. Actually scores were slightly better overall with 7 SP0 which is a bit odd, but maybe that's Spectre/Meltdown mitigations or other security updates. That also means no code automatically takes advantage of AVX in what I tested for SSE2 build. I was able to spot a difference with the unofficial IA-32/SSE(1) builds and SSE2 with software rendering, but nothing past SSE2 shows any difference in what I've tested.

The only lead I have is that decoding AV1 media should be better with AVX2 if it's high resolution, 10 bit, and hundreds of FPS. This seems like a massive edge case, and even then I think it just automatically takes advantage of it if available. I have nothing else for AVX(2) potentially improving performance.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5587
Joined: 2015-12-09, 15:45

Re: Defaulting to AVX for 64-bit architectures?

Unread post by moonbat » 2024-04-06, 03:57

Deadgye wrote:
2024-04-05, 14:59
I'd wager that a decent proportion or amount of people on arcane hardware are also the type that don't visit this forum when everything is working great and typically have analytics/telemetry disabled.
Pale Moon has no analytics or telemetry, the code to do that does not exist in the browser let alone a server to send the data to. It's one of the biggest differences in philosophy between it and what Mozilla has done to Firefox since 2011, and also contributes to better performance and resource usage.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1612
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Defaulting to AVX for 64-bit architectures?

Unread post by athenian200 » 2024-04-06, 12:23

marigold wrote:
2024-04-05, 16:22
Then you are back to maintaining and offering multiple builds, in which case my original suggestion is apt - offer "unoptimised" 32-bit and 64-bit builds and a "hardware optimised" 64-bit build.
The difference is that dbsoft independently doing an additional build for Intel Macs doesn't force Travis to do the same on Linux, just like me not adopting AVX on illumos doesn't force anyone else to not adopt AVX. Whereas if we took that as an official stance and created an obligation on the official maintainers to do this for every supported platform, I think it would be forcing Travis to do four builds for Linux every single release, and Moonchild to do one additional build for Windows every release.

That is to say, I think we absolutely need to keep the idea of SSE2 builds out of our mainline releases to avoid putting additional work on Moonchild and Travis in particular. But altOS is a different story, the maintainers can deal with this issue differently if we aren't talking about the flagship Windows/Linux releases. Also, community builds can still build SSE2 versions, sort of like how Nuck-TH is doing AVX builds now. But that way the burden isn't on the official maintainers to keep it up and there's not an implied promise from us that such builds will happen regularly.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37644
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Defaulting to AVX for 64-bit architectures?

Unread post by Moonchild » 2024-04-06, 13:08

Mac is considered as official as Windows and Linux. It's distributed the same way, updated the same way, etc. I do expect those to follow system requirements, unless there really is a majority of users on Intel Macs who are running early gen stuff (which I don't think is the case).
FreeBSD being beta has no obligation to retain support for non-AVX either, by the way.

Bottom line is: what is currently on the download page should all move to AVX in the summer, and as stated before I also expect all major desktop Linux distros to follow suit if they build and distribute Pale Moon themselves. No confusion about system requirements.
AltOS that generally caters to old hardware can use different optimizations if it would otherwise mismatch the user base on that AltOS - and as said before I expect the maintainers of those to indicate the optimizations differ in that case so users are aware it's not a 100% match to our main binary distributions.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1612
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Defaulting to AVX for 64-bit architectures?

Unread post by athenian200 » 2024-04-06, 15:21

Moonchild wrote:
2024-04-06, 13:08
Bottom line is: what is currently on the download page should all move to AVX in the summer, and as stated before I also expect all major desktop Linux distros to follow suit if they build and distribute Pale Moon themselves. No confusion about system requirements.
Well, now I'm somewhat confused myself.

It sounds like you're saying that no one can build or distribute Pale Moon without AVX optimizations if they want to use official branding, unless they get explicit permission? And otherwise they would have to use the generic branding or something?

I definitely got the message about the stuff on the downloads page changing, but this kind of sounds like it's a bit further-reaching than I thought.

Like, if this is going to involve actually approaching downstream rebuilders of Pale Moon on various distros and asking them to use AVX optimizations or else cease using official branding, then I'm against the idea. I don't think this is a hill worth dying on, and trying to enforce such a thing would make us wildly unpopular. I thought adopting AVX meant everything on the downloads page was AVX, and whatever downstream rebuilders do is not our problem.

The fact is, I really don't see Linux distros ever going along with AVX optimizations in their own builds. If their distro is targeting v1, they will compile Pale Moon with SSE2. If their distro is targeting v3, they will compile Pale Moon with AVX2. The only thing that is going to happen if we try and make an issue of it, is that we wind up in a Mozilla/IceWeasel situation again with a lot of distros using unofficial branding in protest, or just not shipping Pale Moon at all. There might be some things that it's worth doing that over, but I am not sure these optimizations are worth picking that many fights over.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37644
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Defaulting to AVX for 64-bit architectures?

Unread post by Moonchild » 2024-04-06, 16:01

athenian200 wrote:
2024-04-06, 15:21
It sounds like you're saying that no one can build or distribute Pale Moon without AVX optimizations if they want to use official branding, unless they get explicit permission? And otherwise they would have to use the generic branding or something?
That's NOT what i said. I don't get why you think that's what I said.

Our binaries as distributed from the website will be AVX. Community builds can use whatever, but as a courtesy I'd expect a mention that optimizations are different if they deviate. And I'd expect major desktop Linux distros to follow along what we do with our binaries as those users would be running similarly modern hardware. But if Linux is sticking with the v1/v3 choice then they can stick with whatever they use system-wide too. Performance might be different in that case. Once again, a courtesy mention in that case would be appreciated.
I'm not hardlining this otherwise.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
athenian200
Contributing developer
Contributing developer
Posts: 1612
Joined: 2018-10-28, 19:56
Location: Georgia

Re: Defaulting to AVX for 64-bit architectures?

Unread post by athenian200 » 2024-04-06, 16:09

Moonchild wrote:
2024-04-06, 16:01
That's NOT what i said. I don't get why you think that's what I said.

Our binaries as distributed from the website will be AVX. Community builds can use whatever, but as a courtesy I'd expect a mention that optimizations are different if they deviate. And I'd expect major desktop Linux distros to follow along what we do with our binaries as those users would be running similarly modern hardware. But if Linux is sticking with the v1/v3 choice then they can stick with whatever they use system-wide too. Performance might be different in that case. Once again, a courtesy mention in that case would be appreciated.
I'm not hardlining this otherwise.
Yeah, that was what I thought initially. Sounds reasonable to me. :thumbup:

I think I just got confused because of the chain of discussion and other people making assumptions and correcting each other... this thread has probably just gone on for too long to the point that I'm losing track of who said what when.
"The Athenians, however, represent the unity of these opposites; in them, mind or spirit has emerged from the Theban subjectivity without losing itself in the Spartan objectivity of ethical life. With the Athenians, the rights of the State and of the individual found as perfect a union as was possible at all at the level of the Greek spirit." -- Hegel's philosophy of Mind

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 37644
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: Defaulting to AVX for 64-bit architectures?

Unread post by Moonchild » 2024-04-06, 16:24

Let's just lock it then.
"A dead end street is a place to turn around and go into a new direction" - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite