Is libtremor still needed in the platform? Topic is solved

Discussions about the development and maturation of the platform code (UXP).
Warning: may contain highly-technical topics.

Moderators: trava90, athenian200

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

Re: Is libtremor still needed in the platform?

Unread post by Moonchild » 2022-07-25, 13:57

I'm sorry but why are you so adamant about wanting to cut this support when it actually isn't harming anyone being a build option?

If ARM32 (which we do support as a build option otherwise) can be either with or without FPU then it makes sense to keep the option for integer math as a build option.
random wrote:
2022-07-25, 12:21
Is there any Palemoon binary for download that is compiled with tremor?
Not as far as I know, but then again we also don't have official binaries available for ARM, period. You'll have to build them yourself or rely on a community build. That isn't an argument for having the build option though. "Spin your own" is very much an option for Pale Moon (mind the space) and always has been.
random wrote:
2022-07-25, 12:21
What are with other parts of Palemoon. Is everything integer math or would the potential desktop machine with floating point free CPU have to emulate floating point instructions?
We have fallback code for just about everything. If you want to you could probably build an i386 version of Pale Moon and it would run :P. No SIMD, no FPU. I can't vouch for it being usable or performant of course, but it's an option. Most code paths are of sufficiently high level that the machine code is solely determined by compiler config, and hot patchs that are hand optimized tend to all have generic fallback code.
"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

dbsoft
Project Contributor
Project Contributor
Posts: 405
Joined: 2020-02-21, 17:35

Re: Is libtremor still needed in the platform?

Unread post by dbsoft » 2022-07-25, 23:32

random wrote:
2022-07-25, 12:21
Do you know any computer without hardware floating point support that could run Palemoon reasonably well? I bet there is none.
Which OS and desktop environment would the theoretical floating point disabled computer run?
Well an example of one is the Endless Mini with a 32-bit Cortex A5 running Endless OS which is a Linux distro.

https://www.cnet.com/reviews/endless-mini-review/

However, this whole discussion seems kind of silly. Even if there are few computers without hardware floating point, what is the presence of libtremor hurting? There are very few 32-bit ARM systems period, would it make sense to just drop support for 32-bit ARM?

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

Re: Is libtremor still needed in the platform?

Unread post by athenian200 » 2022-07-26, 00:25

https://www.anandtech.com/show/6971/exp ... processors

"We start with the Cortex A9. Cortex A9 achieves throughput of 1 operation/cycle for most scalar instructions, except for fp64 MUL and fp64 MAC, which can only be issued once every two cycles. The mixed test reveals that though fp64 muls can only be issued every two cycles, Cortex A9 can issue a fp64 add in the otherwise empty pipeline slot. Thus, in the mixed test it was able to achieve throughput of 1 instruction/cycle. NEON implementation in Cortex A9 has a 64-bit datapath and all NEON instructions take 2 cycles. Qualcomm's Scorpion implementation of scalar implementations is similar to Cortex A9 except that it seems unable to issue fp64 adds immediately after fp64 muls in the mixed test. Scorpion uses a full 128-bit datapath for NEON and has twice the throughput of Cortex A9."

"In the big picture, readers may want to know how the the floating point capabilities of these cores compares to x86 cores. I consider Intel's Ivy Bridge and Haswell as datapoints for big x86 cores, and AMD Jaguar as a datapoint for a small x86 core. For double-precision (fp64), current ARM cores appear to be limited to 2 flops/cycle for FMAC-heavy workloads and 1 flops/cycle for non-FMAC workloads. Ivy Bridge can have a throughput of up to 8 flops/cycle and Haswell can do 16 flops/cycle with AVX2 instructions. Jaguar can execute up to 3 flops/cycle. For fp32, Ivy Bridge can execute up to 16 fp32 flops/cycle, Haswell can do up to 32 fp32 flops/cycle and AMD's Jaguar can perform 8 fp32 flops/cycle. Thus, current ARM cores are noticeably behind in this case. Apart from the usual reasons (power and area constraints, very client focused designs), current ARM cores also particularly lag behind in this case because currently NEON does not have vector instructions for fp64. ARMv8 ISA adds fp64 vector instructions and high performance implementations of the ISA such as Cortex A57 should begin to reduce the gap."

According to what they linked, the Cortex A9 is not great at floating point, even with an FPU. So the issue appears to be that the FPU is a bit underpowered even if it's present, not that it isn't present at all. For instance, my old Ivy Bridge desktop from 2012 can do 32 single-precision and 8 double-precision floats in a single cycle, while an ARM processor would struggle to do 1 floating point instruction per cycle. And that's with a Cortex A9, never mind the A7.
"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
jobbautista9
Keeps coming back
Keeps coming back
Posts: 780
Joined: 2020-11-03, 06:47
Location: Philippines
Contact:

Re: Is libtremor still needed in the platform?

Unread post by jobbautista9 » 2022-07-26, 03:07

random wrote:
2022-07-25, 12:21
What about much more popular codecs like mp3 or aac? Are they floating point free?
I'm not sure about that, since the platform will use the system's libraries for MP3 and AAC due to patent issues (though the patents of MP3 have long expired, maybe we should start using ffmpeg's MP3 decoder like Mozilla did for Firefox 71?). I think for Windows that would be WMF, Mac would be CoreAudio, and Linux and SunOS would be libavcodec. I'm certain though that fixed-point decoders for those codecs exist in libav, though I'm not sure how libav would detect whether to use fixed-point or floating-point. Or if it even does that at all, and if not just stick to one decoder.
Image

merry mimas

XUL add-ons developer. You can find a list of add-ons I manage at http://rw.rs/~job/software.html.

Mima avatar by 絵虎. Pixiv post: https://www.pixiv.net/en/artworks/15431817

Image

User avatar
random
Apollo supporter
Apollo supporter
Posts: 33
Joined: 2022-07-22, 06:31

Re: Is libtremor still needed in the platform?

Unread post by random » 2022-07-26, 12:43

Moonchild wrote:
2022-07-25, 13:57
I'm sorry but why are you so adamant about wanting to cut this support when it actually isn't harming anyone being a build option?
I'm not. I don't have any strong opinion about removing or keeping Tremor in the Palemoon sources. I'm just arguing that it wouldn't make much of a difference for the user (none?), because I believe that no one is using it. There are much greater performance problems running Palemoon on platforms that don't support floating point (which most likely means slow CPU and low memory).
dbsoft wrote:
2022-07-25, 23:32
Well an example of one is the Endless Mini with a 32-bit Cortex A5 running Endless OS which is a Linux distro.
Doesn't count as an example ;). The Amlogic S805 does have a FP module per core.
athenian200 wrote:
2022-07-26, 00:25
According to what they linked, the Cortex A9 is not great at floating point, even with an FPU. So the issue appears to be that the FPU is a bit underpowered even if it's present, not that it isn't present at all. For instance, my old Ivy Bridge desktop from 2012 can do 32 single-precision and 8 double-precision floats in a single cycle, while an ARM processor would struggle to do 1 floating point instruction per cycle. And that's with a Cortex A9, never mind the A7.
Cortex A9 is from 2007 and precedes Cortex A5 (2009), which precedes Cortex A7 (2011). All not fast. My old super-cheap PC from 2006 performs much better than a Raspi 2. Still, decoding a Vorbis files is not really a problem at all. (Only that Palemoon is crashing the Xserver, but that is another topic).

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

Re: Is libtremor still needed in the platform?

Unread post by Moonchild » 2022-07-26, 13:15

Off-topic:
random wrote:
2022-07-26, 12:43
Only that Palemoon is crashing the Xserver, but that is another topic
That was already solved (as well as a workaround provided) and it's actually the driver crashing the x server, not Pale Moon. Don't blame the application for that crash. :coffee:
"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

dbsoft
Project Contributor
Project Contributor
Posts: 405
Joined: 2020-02-21, 17:35

Re: Is libtremor still needed in the platform?

Unread post by dbsoft » 2022-07-26, 20:19

random wrote:
2022-07-26, 12:43
Doesn't count as an example ;). The Amlogic S805 does have a FP module per core.
Not according to their web site... it is an option, but not by default.

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

Re: Is libtremor still needed in the platform?

Unread post by Moonchild » 2022-07-27, 03:39

Ultimately, the answer is therefore "yes, it's still needed to be there as an option" like already said before.
It's not hurting anything by being there. It's still potentially used for certain builds on 32-bit ARM. It should be mature enough code to not cause a maintenance burden.
I therefore see no reason to prioritise removal at the moment.
"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
random
Apollo supporter
Apollo supporter
Posts: 33
Joined: 2022-07-22, 06:31

Re: Is libtremor still needed in the platform?

Unread post by random » 2022-07-27, 06:32

dbsoft wrote:
2022-07-26, 20:19
Not according to their web site... it is an option, but not by default.
Do you have a link?

Locked