Pale Moon x86-64 SSE2/AVX2

For contributed third party builds not necessarily configured like the main product.
e.g. AVX builds, SSE builds, Pandora builds.
User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 236
Joined: 2020-03-02, 16:04

Pale Moon x86-64 SSE2/AVX2

Unread post by Nuck-TH » 2022-02-07, 15:50

Amended Wed Aug 14, 2024 at 19:21 UTC.

As allowed by Moonchild, i finally decided to post my AVX/AVX2 builds of Pale Moon.
From version 33.3 and forward they are actually SSE2/AVX2.
(Important) If your CPU doesn't support AVX instruction set and you used mainline build - you must manually migrate to SSE2 build from here. Reverse also applies: if you used AVX build - you should migrate to mainline build.

Build VM is latest VirtualBox with:
  • Pale Moon release branch
  • Windows 10 LTSC and VS2022/SDK(updated) and tools as specified on dev site with following .mozconfig:

    Code: Select all

    # Tell the build system if we're building 64-bit.
    # Set this to `BUILD_64=1` for 64-bit, leave as-is for 32-bit
    BUILD_64=1
    
    # Processor architecture specific build options
    if [ -n "$BUILD_64" ]; then
    BUILD_ARCH=x64
    ac_add_options --target=x86_64-pc-mingw32
    ac_add_options --host=x86_64-pc-mingw32
    else
    BUILD_ARCH=x86
    fi
    
    # Automatically clobber if CLOBBER was touched
    mk_add_options AUTOCLOBBER=1
    
    # Application and target
    ac_add_options --enable-application=palemoon
    #export MOZ_PKG_SPECIAL=sse2
    #mk_add_options MOZ_OBJDIR=../build/obj-pm-x64-sse2-release
    export MOZ_PKG_SPECIAL=avx2
    mk_add_options MOZ_OBJDIR=../build/obj-pm-x64-avx2-release
    
    # Build options
    mk_add_options MOZ_MAKE_FLAGS="-j6"
    #ac_add_options --enable-optimize="-O2b1 -GTs -GS- -favor:AMD64 -Qspectre -utf-8"
    ac_add_options --enable-optimize="-O2b1 -GTs -GS- -Qspectre -utf-8 -arch:AVX2"
    
    ac_add_options --enable-official-branding
    ac_add_options --enable-update-channel=release
    ac_add_options --enable-updater
    
    ac_add_options --disable-precompiled-startupcache
    
    ac_add_options --enable-jemalloc
    ac_add_options --enable-strip
    
    ac_add_options --disable-parental-controls
    ac_add_options --disable-accessibility
    ac_add_options --disable-gamepad
    ac_add_options --disable-webrtc
    
    ac_add_options --enable-av1
    ac_add_options --enable-jxl
    
    export MC_OFFICIAL=1
    export MOZILLA_OFFICIAL=1
    
    WIN32_REDIST_DIR="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/14.40.33807/$BUILD_ARCH/Microsoft.VC143.CRT"
    WIN_UCRT_REDIST_DIR="C:/Program Files (x86)/Windows Kits/10/Redist/10.0.22000.0/ucrt/DLLs/$BUILD_ARCH"
    
  • Oracle Linux 8 with gcc-toolset-11 as specified on dev site with following .mozconfig:

    Code: Select all

    # Set GTK Version to 2 or 3
    #_GTK_VERSION=2
    
    # Application and target
    #export MOZ_PKG_SPECIAL=sse2_gtk"$_GTK_VERSION"
    export MOZ_PKG_SPECIAL=avx2_gtk"$_GTK_VERSION"
    mk_add_options MOZ_OBJDIR=../build/obj-pm-x64-$MOZ_PKG_SPECIAL-release
    ac_add_options --enable-application=palemoon
    
    # Build options
    mk_add_options MOZ_MAKE_FLAGS="-j6"
    #ac_add_options --enable-optimize="-O2 -msse2 -mfpmath=sse -w"
    ac_add_options --enable-optimize="-O2 -march=x86-64-v3 -w"
    ac_add_options --enable-default-toolkit=cairo-gtk$_GTK_VERSION
    
    ac_add_options --enable-official-branding
    ac_add_options --enable-update-channel=release
    ac_add_options --enable-updater
    
    ac_add_options --disable-precompiled-startupcache
    
    ac_add_options --enable-jemalloc
    ac_add_options --enable-strip
    
    ac_add_options --enable-devtools
    ac_add_options --enable-av1
    ac_add_options --enable-jxl
    
    ac_add_options --disable-gamepad
    ac_add_options --disable-tests
    ac_add_options --disable-debug
    ac_add_options --disable-necko-wifi
    
    ac_add_options --disable-webrtc
    
    ac_add_options --with-pthreads
    
    # Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
    export MC_OFFICIAL=1
    export MOZILLA_OFFICIAL=1
    
    ac_add_options --x-libraries=/usr/lib64
    
    Both GTK2 and GTK3 builds are done.
Casual usage of AVX and AVX2 Windows builds on both intel and AMD processors shows no apparent instability, but be aware that it is still possible as no extensive testing was ever done. At this point it seems like i can conclude that there is no additional issues so far.
It is unclear if this build provides any performance benefits(allegedly it does, but no side-by-side comparison was done), so your mileage may vary.

I will try to build new releases ASAP, but may lag a day or two. Usually i do wait for shakedown to build straight up point releases avoiding unnecessary work.

Carefully take note of the following:
  • While branded with official branding, this build has non-official settings(usage of SSE2/AVX2 optimizations), so before getting official support you should reproduce problem on official build with clean profile.
  • From 31.0.0-Windows and 31.1.0-Linux onward builds have auto updater.
  • WARNING: I have no full-fledged linux installation, so Linux builds are "tested" to the extent that they run on build system. Please use them with caution until at least handful of users report them stable enough.While testing from my part isn't changed, there are no complains so far.
  • Using AVX2 build on CPU that doesn't support this instruction set will cause instability and crashes. Google your CPU model or use software like CPU-Z to check.
  • Installers are not signed, but GPG detached signatures are provided for both archives and installers.
PGP public key:
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQGNBGI0so0BDADpA18guP7Dj0rAwwQ/UY6pDC8gEIr38fg1MsRz1ltmvxULxwNw
XnPlEBe+rGtLrBWHlKnoxWwnLpNYKFx8C25PsPUqPBR3pHe3rvun795+WGJAhb1e
m93HOgSqgYt8mnQz+vA1KD8etZ07xO7/uQRsHLmEV3g6udaQpKH21PRJ2Ds7HtHV
kQW9bMAAmTsQlJswnug+aFxZzZarXp+Zh4Pm5U3doKL+A3H50f/8NBp5rIa+ionS
kGmO0JKKzuKNZjqrFXopgy1+bkL3XaglxmsbGBR56DdwX5nsAB1plz29WHGFTi2Y
ySCeEeBsJdPplXwYfFspFHgwxS69hXBWvtJPOB2wbMm/EryKXvaQEc6Cyn81TBCp
oFddlRhIkqOHw9cP2XHDTXLE8LAOIEDbah7syWWnozMUBIZwxdkxbHkQoUluI8eB
FDQthT8n9ts5cnMZuxwFdtPAQ9dF6nv4plNBdZNbOyINuSFHqXI4mVt0JAnmZeR9
S9o6Cbto7v2MajcA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NXwVRfTnRdV0t0MCJHAhN8M9T29NmGKTdzHMsRMhPFcOoiQt2lHYVe3z+xcvISx
jsCZtfvewXFjHs7Fm9xxCWwkiyUAuKbHoJzn4FgFH6AuhLuNCIKIc9sT5EsYDrrh
N0ADABEBAAGJAbwEGAEIACYCGwwWIQRQYcxRyUMGBQz6H+5I+tKQfYTt6wUCZgQY
6wUJBbCZ3gAKCRBI+tKQfYTt6y6VC/9pJLd8xqfb/OdjESSXOf07hB4IcLSw9TrA
ZQm4d2Qc0dPptOQE1JycLYOlFzbgcIPll2ngZ9gSb4GqMORw3AD5JMBGy+gZcnSx
RDejBGJbOENYhhmYTDl0BT7mJx3fbQoqsApGok+PwxW5kZwMdU4DikzISKOE5QOW
/EKKZEBXqwkia1s6w3JDMbnjx8E2OdN07s4RvhQd7OnSxH9XeXplNDZlJ51bVRmm
c4hw4caFFiA6cVYIayyjXqU/lpV02IdwUvLH7SNTN94qs/9XgY3ioabznOuuB+YE
5a3sebNobNTj+B3VdXR0dv0JI/PyMW18P2l6Y9Uhh0Mk5LJeebbKd+C3YkfOSBIT
ATNqhQU+7Vz+uEicTMJwaWJtQK4m6fFWikSJeKidEmXlqc4cuIzzRIr0RvYYtKxW
YtTyuaBkDlGl0O0RDgfBfyKjcDQ3DEZ6CMFnrCB3AlrfCbRM6yLg9sHqndZQ2YW3
N/ouPGTKugh7EL2HSXL0iwtVw4oPa2o=
=n+oV
-----END PGP PUBLIC KEY BLOCK-----
If you understood information and warnings above, then latest builds would be on contributed builds FTP:
Windows: FTP HTTP
Linux: FTP HTTP

To make portable version paste palemoon folder from 7z archive into bin folder inside unpacked official portable version, but note that usage of not yet universally widespread instruction sets will limit its portability.

User avatar
Eduardo Lucas
Moon lover
Moon lover
Posts: 94
Joined: 2021-07-08, 13:08
Location: São Paulo, Brazil

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Eduardo Lucas » 2022-02-19, 04:41

This is simply amazing. Tried AVX2 Build on windows 7 ryzen 5 3500U. Sublime performance.

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 236
Joined: 2020-03-02, 16:04

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Nuck-TH » 2022-03-19, 15:05

It was decided to hold for the hotfix release, so stay tuned.

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 236
Joined: 2020-03-02, 16:04

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Nuck-TH » 2022-03-26, 14:44

Build of version 29.4.5 is in the same Yandex.Disk folder, now with x86 builds and detached PGP signatures instead of checksums.

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 236
Joined: 2020-03-02, 16:04

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Nuck-TH » 2022-03-30, 18:59

Build of version 29.4.5.1 published without any further changes.

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 236
Joined: 2020-03-02, 16:04

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Nuck-TH » 2022-04-13, 18:20

Version 29.4.6 is up. Please update, as it contains security patches.
Also note that i do x86 builds already for some time, so if your system is not 64-bit - you can benefit from AVX(2) too.

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

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Moonchild » 2022-04-13, 21:18

Nuck-TH wrote:
2022-04-13, 18:20
Version 29.4.6 is up. Please update, as it contains security patches.
Also note that i do x86 builds already for some time, so if your system is not 64-bit - you can benefit from AVX(2) too.
Um... AVX/AVX2 is a thing for 64-bit CPUs only. 32-bit processors don't have AVX extensions. The earliest processor that had AVX is the Intel Sandy Bridge (2011) and those were x86_64 only. Same on AMD's side. Now, I'm not sure if running a 32-bit OS on a 64-bit CPU will still give you access to the AVX instructions or not. I guess you might but it's a strange setup in that case.
"A programmer is someone who solves a problem you didn't know you had, in a way you don't understand." -- unknown
"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
R3n_001
Moonbather
Moonbather
Posts: 67
Joined: 2019-05-25, 20:39
Contact:

Re: Pale Moon AVX/AVX2

Unread post by R3n_001 » 2022-04-13, 21:25

I was going to post saying that I don't think there is much of a reason for people to use an AVX capable CPU with x86 Windows (except retro 2000/XP builds on modern hardware), but I backed out because this forum is very unpredictable.

User avatar
andyprough
Keeps coming back
Keeps coming back
Posts: 908
Joined: 2020-05-31, 04:33

Re: Pale Moon x86-64 AVX/AVX2

Unread post by andyprough » 2022-04-13, 23:44

Moonchild wrote:
2022-04-13, 21:18
Now, I'm not sure if running a 32-bit OS on a 64-bit CPU will still give you access to the AVX instructions or not. I guess you might but it's a strange setup in that case.
I run 32-bit antiX Linux on some of my older 64-bit systems because the memory usage is nearly cut in half while the performance remains about the same. I'd like to try AVX/AVX2 Pale Moon and see if it would run and if it would be fast, but @Nuck-TH hasn't made any Linux versions from what I could see.

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 236
Joined: 2020-03-02, 16:04

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Nuck-TH » 2022-04-14, 03:46

Moonchild wrote:
2022-04-13, 21:18
Um... AVX/AVX2 is a thing for 64-bit CPUs only. 32-bit processors don't have AVX extensions. The earliest processor that had AVX is the Intel Sandy Bridge (2011) and those were x86_64 only. Same on AMD's side. Now, I'm not sure if running a 32-bit OS on a 64-bit CPU will still give you access to the AVX instructions or not. I guess you might but it's a strange setup in that case.
I meant 32-bit OS on CPUs with AVX(2) support.
A bit of searching shows that using AVX while running 32-bit OS is allegedly possible, but some instructions(apparently that operate 64-bit operands or something like that) are not available. Bad thing that apparently it fails silently without illegal instruction fault. So compiler should take this into account, but places with hand-optimised assembly may cause issues if no checks are made.

User avatar
Pentium4User
Board Warrior
Board Warrior
Posts: 1254
Joined: 2019-04-24, 09:38
Contact:

Re: Pale Moon AVX/AVX2

Unread post by Pentium4User » 2022-04-14, 05:27

Why should we today use an 32 Bit OS (i386 etc.) on a CPU with amd64 instructions?
I can't see a reason. I only use i686 on CPUs without amd64/EM64T.
The profile picture shows my Maico EC30 E ceiling fan.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2506
Joined: 2012-08-19, 20:32

Re: Pale Moon AVX/AVX2

Unread post by back2themoon » 2022-04-14, 07:00

Pentium4User wrote:
2022-04-14, 05:27
Why should we today use an 32 Bit OS (i386 etc.) on a CPU with amd64 instructions?
I can't see a reason. I only use i686 on CPUs without amd64/EM64T.
My guess would be lower RAM usage and specific driver availability, for systems that still need these.

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

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Moonchild » 2022-04-14, 11:00

Nuck-TH wrote:
2022-04-14, 03:46
A bit of searching shows that using AVX while running 32-bit OS is allegedly possible, but some instructions(apparently that operate 64-bit operands or something like that) are not available. Bad thing that apparently it fails silently without illegal instruction fault. So compiler should take this into account, but places with hand-optimised assembly may cause issues if no checks are made.
I really advise against publishing these x86 builds then. Our platform -has- a lot of hand-written assembly in it, including AVX stuff, in various components that may fail as a result. While I am fairly certain it's all guarded with x64 checks, I'm not 100% sure.
The MSVC compiler doesn't offer AVX options in x86 cross-compile mode for a reason, too, so I don't know in what other way (except the potentially broken way) you'd be optimizing the 32-bit ones, and it would in effect be just like the mainline binaries for x86 aside from potential problems :P People should just be using the mainline ones instead in that case as there won't be a positive difference.
"A programmer is someone who solves a problem you didn't know you had, in a way you don't understand." -- unknown
"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
Nuck-TH
Project Contributor
Project Contributor
Posts: 236
Joined: 2020-03-02, 16:04

Re: Pale Moon AVX/AVX2

Unread post by Nuck-TH » 2022-04-14, 12:41

Taken down then. Better to keep away from very possible potential issues.
Less build time for me then, yay. Maybe i would consider linux builds, but that would be completely untested, as i don't run(yet?) linux except for occasional development or building stuff. It also bugs me that i probably won't be able to provide packages for package managers, because it is very convenient way of installing and updating software...
So much for thread renaming %)

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

Re: Pale Moon x86_64 AVX/AVX2

Unread post by Moonchild » 2022-04-14, 13:02

Nuck-TH wrote:
2022-04-14, 12:41
So much for thread renaming %)
I renamed it back :D
"A programmer is someone who solves a problem you didn't know you had, in a way you don't understand." -- unknown
"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
andyprough
Keeps coming back
Keeps coming back
Posts: 908
Joined: 2020-05-31, 04:33

Re: Pale Moon AVX/AVX2

Unread post by andyprough » 2022-04-14, 14:11

Nuck-TH wrote:
2022-04-14, 12:41
It also bugs me that i probably won't be able to provide packages for package managers, because it is very convenient way of installing and updating software...
I wouldn't be concerned about the different package managers if I were you, the tarball binaries work great and are very convenient.

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

Re: Pale Moon x86-64 AVX/AVX2

Unread post by R3n_001 » 2022-04-14, 14:44

Just ship a flatpak.

User avatar
Nuck-TH
Project Contributor
Project Contributor
Posts: 236
Joined: 2020-03-02, 16:04

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Nuck-TH » 2022-04-14, 15:45

R3n_001 wrote:
2022-04-14, 14:44
Just ship a flatpak.
I'd better bother with good old native package managers than figure out and use solution with fair share of substantial issues.
And i'm not even starting on that it is likely not possible due to licensing issues that were previously discussed on the forum.

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

Re: Pale Moon x86-64 AVX/AVX2

Unread post by R3n_001 » 2022-04-14, 15:50

Nuck-TH wrote:
2022-04-14, 15:45
R3n_001 wrote:
2022-04-14, 14:44
Just ship a flatpak.
I'd better bother with good old native package managers than figure out and use solution with fair share of substantial issues.
And i'm not even starting on that it is likely not possible due to licensing issues that were previously discussed on the forum.
If you can get it on each major distros package manager, apt, dnf, pacman, go ahead. However, if you're not going to do that or can't, just go with a flatpak.

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

Re: Pale Moon x86-64 AVX/AVX2

Unread post by Moonchild » 2022-04-14, 18:08

R3n_001 wrote:
2022-04-14, 15:50
Nuck-TH wrote:
2022-04-14, 15:45
R3n_001 wrote:
2022-04-14, 14:44
Just ship a flatpak.
I'd better bother with good old native package managers than figure out and use solution with fair share of substantial issues.
And i'm not even starting on that it is likely not possible due to licensing issues that were previously discussed on the forum.
If you can get it on each major distros package manager, apt, dnf, pacman, go ahead. However, if you're not going to do that or can't, just go with a flatpak.
Can't be done due to licensing issues as already pointed out.
"A programmer is someone who solves a problem you didn't know you had, in a way you don't understand." -- unknown
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Post Reply