indoctrinated reality in nesdev(?)

You can talk about almost anything that you want to on this board.
Bavi_H
Posts: 250
Joined: Sun Mar 03, 2013 1:52 am
Location: Texas, USA

Re: indoctrinated reality(?)

Post by Bavi_H »

tepples wrote: Mon Nov 04, 2024 8:15 pm FFmpeg engineers ran benchmarks and found that rewriting certain steps of video decoding in AVX-512 assembly speeds up their execution by a factor of 94 compared to current compilers. That's not 94% faster but 9400% faster. (Source: @ffmpeg on X)
I wanted to check if it was really a 9300% improvement (in other words, does "×1" mean it was the same speed as before, a 0% improvement?), but the tweet you linked to has no details or links to further information.

I did a quick search online to try to find a little more information, but just came up with places reporting and discussing this news bite. I don't think I can answer my original question yet (if "×1" means it was the same speed as before), but I do see people saying this speed improvement amount is probably a bit of a staged unfair comparison. For example, in the Hacker News item "A 94x speed improvement demonstrated using handwritten assembly", one response says:
The 94x is mildly contested since IIRC how you write the C code really matters (e.g. scalar vs autovectorized). But even with vectorized C code the speed up was something like >10x, which is still great but not as fun to say.
Bavi_H
Posts: 250
Joined: Sun Mar 03, 2013 1:52 am
Location: Texas, USA

Re: indoctrinated reality(?)

Post by Bavi_H »

Bavi_H wrote: Mon Nov 04, 2024 10:44 pmdoes "×1" mean it was the same speed as before, a 0% improvement?
The screenshot in the tweet appears to be using a command line tool called checkasm, so I searched for possible source code for it and found the likely function that prints the benchmark results. It contains code like the following:

ratio = decicycles ? baseline / decicycles : 0.0;

printf("%*.1f (%5.2fx)\n", FFMAX(pad_length, 0), decicycles / 10.0, ratio);

So I think "1.00x" does indeed mean the speed was the same as before.

So the "94.78x" in the screenshot means the speed is 94.78 times the original speed, or, in other words, the speed improved by 9378% of the original speed.
Oziphantom
Posts: 2001
Joined: Tue Feb 07, 2017 2:03 am

Re: indoctrinated reality(?)

Post by Oziphantom »

`improved by 9378%` is the same as `9478% faster`.
Fiskbit
Site Admin
Posts: 1403
Joined: Sat Nov 18, 2017 9:15 pm

Re: indoctrinated reality(?)

Post by Fiskbit »

Not quite. 'Improved by' and 'faster' both mean an improvement beyond 100%, whereas 'as fast' would be absolute. So, if you double the speed, it is improved by 100% or it is 100% faster, but it is 200% as fast.

Unfortunately, there is significant confusion about this and so it is often hard to know if someone is off by 1x or not.
User avatar
donato-zits-
Posts: 92
Joined: Fri Jun 03, 2022 11:14 am
Location: -&&.&&&&&, -88.88888

Re: indoctrinated reality(?)

Post by donato-zits- »

Fisher wrote: Mon Nov 04, 2024 4:39 pm
donato-zits- wrote: Mon Nov 04, 2024 11:34 am eu definitivamente não vou leer isso, nem tentar digamos, você pode postar isso aqui por gentileza?
I definitly dont will read this, let's say that I even do not will try, do you can post this here do me a favor?
Confesso que estava bem "inspirado" quando escrevi este post, mas resumi bastante no outro.

aahh e não de esqueça de "a quem" estaria fazendo esse favor, no caso de fazer-lo..
aah and do not forget of "to who" you could be doing that favor, in the doing case...
viewtopic.php?t=24252 <<<<my game
viewtopic.php?t=25285 <<<my second game
tepples
Posts: 23011
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)

Re: indoctrinated reality(?)

Post by tepples »

Bavi_H wrote: Mon Nov 04, 2024 10:44 pm
The 94x is mildly contested since IIRC how you write the C code really matters (e.g. scalar vs autovectorized). But even with vectorized C code the speed up was something like >10x, which is still great but not as fun to say.
Or maybe the real takeaway is that available Free compilers are still failing at automatic vectorization, and the "it is unreasonable to expect to be able to beat a modern compiler targeting a modern instruction set" peanut gallery tend to forget this.
calima
Posts: 1789
Joined: Tue Oct 06, 2015 10:16 am

Re: indoctrinated reality(?)

Post by calima »

The proprietary compilers are not much better at autovec either.
User avatar
segaloco
Posts: 958
Joined: Fri Aug 25, 2023 11:56 am

Re: indoctrinated reality(?)

Post by segaloco »

I would suspect at least part of it is the newer of extensions you have your compiler try and use, the more chance you have of leaving someone out in the rain if their CPU doesn't have those extensions. If you are building your own binaries and adding your own compiler features to CFLAGS, you can take advantage, but unless the detection of extensions and usage of codepaths using them is done at runtime, you kinda have to compile with the least common denominator for distributed binaries, which then leads to compiler optimizations that use modern extensions not getting exercised as the well entrenched stuff using base features of ISAs.
User avatar
Fisher
Posts: 1299
Joined: Sat Jul 04, 2015 9:58 am
Location: -29.794229 -55.795374

Re: indoctrinated reality(?)

Post by Fisher »

As said in this thread, most electronic stuff is not built to last but to sell and be profitable, so what about space probes and other deep space exploration devices?
Do they use some different engineering approach?
I think in this case not only durability is a key factor, but also efficiency.

In my somewhat limited view, assembly language would be a key tool for meeting these kinds of demands.
This with probably some heavy-duty enforcement on shielding and protection of its inner circuits was what made probes like Voyager that has about 40 years of great service.

So without assembly, would this be possible or even more cost-effective?
User avatar
segaloco
Posts: 958
Joined: Fri Aug 25, 2023 11:56 am

Re: indoctrinated reality(?)

Post by segaloco »

Given Moore's Law, the efficiency needs of modern technology far exceed those of decades past. It's unfortunate that the answer continues to be to just throw more computing resources at problems rather than optimizing existing solutions, but the market has decided long ago that efforts are going to by and large go into more resourcing than frugal use thereof. Without a sophisticated analysis of the net costs incurred by the current approach, it'd be very hard to convince industry players that they're letting profit slip through their hands by not investing their time in efficiency. Unfortunately their only focus is next quarter's earnings, not the proverbial (and real) pollution they're leaving for future generations to mitigate.
User avatar
creaothceann
Posts: 875
Joined: Mon Jan 23, 2006 7:47 am
Location: Germany

Re: indoctrinated reality(?)

Post by creaothceann »

Fisher wrote: Tue Nov 05, 2024 1:46 pm As said in this thread, most electronic stuff is not built to last but to sell and be profitable, so what about space probes and other deep space exploration devices?
Do they use some different engineering approach?
I think in this case not only durability is a key factor, but also efficiency.
Don't know about probes, but at least the Rover used (parts of) C++.
My current setup:
Super Famicom ("2/1/3" SNS-CPU-GPM-02) → SCART → OSSC → StarTech USB3HDCAP → AmaRecTV 3.10
User avatar
nesrocks
Posts: 603
Joined: Thu Aug 13, 2015 4:40 pm
Location: Rio de Janeiro - Brazil

Re: indoctrinated reality(?)

Post by nesrocks »

Slightly off-topic but relevant Pro tip: you need to seriously improve your hand writing if you want to cause good impressions. Good impressions come a long way when asking for someone else to do something for you that they don't have to.
User avatar
donato-zits-
Posts: 92
Joined: Fri Jun 03, 2022 11:14 am
Location: -&&.&&&&&, -88.88888

Re: indoctrinated reality(?)

Post by donato-zits- »

mais um virado que apenas não quer ver o outro lado e somente quer cavar o próprio burako mais e mais profundo ainda, eu jah posso imaginar um ponto de vista bom³ neste comportamento loco, o grito de socorro de um lado entero do Pato não pode ser ouvido por esses sujeitos...
another one fliped that just do not wanna see the other side and just wanna dig the own hole more and more depper, I already can wonder a good³ point of view in that crazy behaivor, a scream of help of a whole side of the pato cant be hear by this ones...
viewtopic.php?t=24252 <<<<my game
viewtopic.php?t=25285 <<<my second game
93143
Posts: 1924
Joined: Fri Jul 04, 2014 9:31 pm

Re: indoctrinated reality(?)

Post by 93143 »

creaothceann wrote: Wed Nov 06, 2024 4:00 amthe Rover
You realize there have been like 20 of those, right? Which one?

[*clicks link*]

Apparently they used at least some C++ on the MER and MSL semiautonomous Mars rovers, as well as presumably Perseverance (which this video is older than). He mentions he had to get a special waiver...
User avatar
donato-zits-
Posts: 92
Joined: Fri Jun 03, 2022 11:14 am
Location: -&&.&&&&&, -88.88888

Re: indoctrinated reality(?)

Post by donato-zits- »

who cares about go to mars here?! the subject here is Family/Fcs/NES, the subject here is people, people that cant wanna learn how to have a possibility to get that sphere of the human knowedge, the respect for yourselves still are going across a BAD sendero; its not my soul behaivor you will go alone, I repeat "alone we go more faster, together we go more far away"

quem da bola aki pra ir pra marte?!o assunto aki eh Family/Fcs/NES, o assunto aki são pessoas, pessoas que não podem querer aprender como ter a possibilidade de pegar essa esfera do conhecimento da sabedoria humana, o respeito próprio ainda está indo por um MAL caminho; não eh o comportamento da minha alma, vocês iram sozinhos, eu repito "sozinhos no vamos mais rápido, justos nos vamos mais longe"
viewtopic.php?t=24252 <<<<my game
viewtopic.php?t=25285 <<<my second game