Pale Moon x86-64 AVX/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: 195
Joined: 2020-03-02, 16:04

Pale Moon x86-64 AVX/AVX2

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

Amended Thu Dec 8, 2022 at 15:39 UTC.

As allowed by Moonchild, i finally decided to post my AVX/AVX2 builds of Pale Moon.

Build VM is latest VirtualBox with:
  • Pale Moon release branch
  • Windows 10 LTSC and VS2022/SDK 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=avx
    export MOZ_PKG_SPECIAL=avx2
    mk_add_options MOZ_OBJDIR=../build/obj-pm-x64-avx-release
    
    # Build options
    mk_add_options MOZ_MAKE_FLAGS="-j6"
    #ac_add_options --enable-optimize="-O2 -GTs -GS- -Qspectre -utf-8 -arch:AVX -favor:AMD64"
    ac_add_options --enable-optimize="-O2 -GTs -GS- -Qspectre -utf-8 -arch:AVX2 -favor:AMD64"
    
    ac_add_options --enable-official-branding
    export MC_OFFICIAL=1
    export MOZILLA_OFFICIAL=1
    
    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-appcompat-guid
    
    ac_add_options --disable-parental-controls
    ac_add_options --disable-accessibility
    ac_add_options --disable-gamepad
    ac_add_options --disable-eme
    ac_add_options --disable-webrtc
    
    ac_add_options --enable-av1
    ac_add_options --enable-jxl
    
    WIN32_REDIST_DIR="C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Redist/MSVC/14.32.31326/x64/Microsoft.VC143.CRT"
    WIN_UCRT_REDIST_DIR="C:/Program Files (x86)/Windows Kits/10/Redist/10.0.22000.0/ucrt/DLLs/$BUILD_ARCH"
    
  • CentOS 7 with devtoolset-9 as specified on dev site with following .mozconfig:

    Code: Select all

    # Set GTK Version to 2 or 3
    #_GTK_VERSION=2
    
    # Set AVX version empty or 2
    #_AVX_VERSION=
    
    # Application and target
    export MOZ_PKG_SPECIAL=avx"$_AVX_VERSION"_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 -mavx$_AVX_VERSION -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 --enable-appcompat-guid
    
    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-eme
    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 AVX/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 any of this build on CPU that doesn't support corresponding 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
S9o6Cbto7v2MajcAEQEAAbQfTnVjay1USCA8bnVjazY3ZDU2NGFAZ21haWwuY29t
PokB1AQTAQgAPhYhBFBhzFHJQwYFDPof7kj60pB9hO3rBQJiNLKNAhsDBQkDwmcA
BQsJCAc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bHoJzn4FgFH6AuhLuNCIKIc9sT5EsYDrrh
N0ADABEBAAGJAbwEGAEIACYWIQRQYcxRyUMGBQz6H+5I+tKQfYTt6wUCYjSyjQIb
DAUJA8JnAAAKCRBI+tKQfYTt69vBC/9hZ3egV8wfMoo5bRWMsDtmevN4u4lTfUPd
NX07V5rbjpKtz5eYv17TwAX8kbpXjd6dlyJZgOCiYRiIzJV7rG8nltUke3WsodfQ
kJT9XocLfOlJkL8i4UISxyUmzWvaFotyDp2tvHUGkqYmeNs19Jfk4I3XHVdGyupH
HSAPa/W3UAabMqn/7HbJpa7bMtGlN2p+pJ2nU3ghuBiX7132wulDHIACxGIYZ093
p0rZSTxUliKuM8zyFjabt32n/STyDLXbUiEKpG0R5MULrMVMk9ApCc+czC2HCtXb
kYuj7I008pQ+J3tm8ztH02HXjwBnidHuGCv95MvBovigN4VjXUmLcmnqrgUI6QKr
OQPL9FYYxSUoIG0rYMAfPLKWz6BCDX3ueJZcdbelohy2GZ19IHEsdsgS7EZB5dUN
siv1DMmvwWHzkPHyKZVcfbEsTX4SIgtNw7sOibMObvg7sB1wQRTVP3uBiH8W4j0P
zi5w9oXXiYW5EzLL5hvembwOMH8FEJ4=
=hh+B
-----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: 195
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: 195
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: 195
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: 195
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: 35402
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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"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: 60
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
Astronaut
Astronaut
Posts: 688
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: 195
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: 1103
Joined: 2019-04-24, 09:38

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: 2358
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: 35402
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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"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: 195
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: 35402
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
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"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
Astronaut
Astronaut
Posts: 688
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: 60
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: 195
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: 60
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: 35402
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.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"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