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
Fanatic
Fanatic
Posts: 118
Joined: 2020-03-02, 16:04

Pale Moon x86-64 AVX/AVX2

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

Amended Sat Jun 11, 2022 at 19.25.

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 7 and VS/SDK and tools as specified on dev site with following .mozconfig:

    Code: Select all

    # Automatically clobber if CLOBBER was touched
    mk_add_options AUTOCLOBBER=1
    
    # Application and target
    #export MOZ_PKG_SPECIAL=avx
    export MOZ_PKG_SPECIAL=avx2
    #mk_add_options MOZ_OBJDIR=../build/obj-pm-x64-avx-release
    mk_add_options MOZ_OBJDIR=../build/obj-pm-x64-avx2-release
    ac_add_options --enable-application=palemoon
    
    # Build options
    mk_add_options MOZ_MAKE_FLAGS="-j6"
    #ac_add_options --enable-optimize="-O2 -GTs -GS- -arch:AVX -favor:AMD64"
    ac_add_options --enable-optimize="-O2 -GTs -GS- -arch:AVX2 -favor:AMD64"
    
    ac_add_options --enable-official-branding
    ac_add_options --enable-update-channel=release
    ac_add_options --enable-updater
    #ac_add_options --disable-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 --enable-av1
    
    ac_add_options --disable-eme
    ac_add_options --disable-webrtc
    
    export MC_OFFICIAL=1
    export MOZILLA_OFFICIAL=1
    
    WIN32_REDIST_DIR=$VCINSTALLDIR/redist/x64/Microsoft.VC140.CRT
    # WIN_UCRT_REDIST_DIR="C:/Program Files (x86)/Windows Kits/10/Redist/10.0.19041.0/ucrt/DLLs/x64"
    WIN_UCRT_REDIST_DIR="C:/Program Files (x86)/Windows Kits/10/Redist/10.0.22000.0/ucrt/DLLs/x64"
    
  • 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-phoenix-extensions
    
    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.
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.

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, through Linux one is not tested yet.
  • 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.
  • 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.
If you understood information and warnings above, then latest builds would be on contributed builds FTP:
Windows
Linux

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
Moonbather
Moonbather
Posts: 61
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
Fanatic
Fanatic
Posts: 118
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
Fanatic
Fanatic
Posts: 118
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
Fanatic
Fanatic
Posts: 118
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
Fanatic
Fanatic
Posts: 118
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: 33031
Joined: 2011-08-28, 17:27
Location: Tranås, 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.
"The best revenge is to not be like the person who wronged you." -- Marcus Aurelius
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb

User avatar
R3n_001
Apollo supporter
Apollo supporter
Posts: 43
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
Lunatic
Lunatic
Posts: 367
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.
Self-compiled Pale Moon on Libre-antiX GNU/Linux respin, 32-bit and 64-bit, and on Hyperbola GNU/Linux 64-bit

User avatar
Nuck-TH
Fanatic
Fanatic
Posts: 118
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
Keeps coming back
Keeps coming back
Posts: 892
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.
I still use a 64 bit capable Pentium 4 670 processor with Pale Moon.

User avatar
back2themoon
Moon Magic practitioner
Moon Magic practitioner
Posts: 2104
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: 33031
Joined: 2011-08-28, 17:27
Location: Tranås, 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.
"The best revenge is to not be like the person who wronged you." -- Marcus Aurelius
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb

User avatar
Nuck-TH
Fanatic
Fanatic
Posts: 118
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: 33031
Joined: 2011-08-28, 17:27
Location: Tranås, 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
"The best revenge is to not be like the person who wronged you." -- Marcus Aurelius
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb

User avatar
andyprough
Lunatic
Lunatic
Posts: 367
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.
Self-compiled Pale Moon on Libre-antiX GNU/Linux respin, 32-bit and 64-bit, and on Hyperbola GNU/Linux 64-bit

User avatar
R3n_001
Apollo supporter
Apollo supporter
Posts: 43
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
Fanatic
Fanatic
Posts: 118
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
Apollo supporter
Apollo supporter
Posts: 43
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: 33031
Joined: 2011-08-28, 17:27
Location: Tranås, 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.
"The best revenge is to not be like the person who wronged you." -- Marcus Aurelius
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb

Post Reply