this post was submitted on 01 Feb 2025
105 points (100.0% liked)

TechTakes

44 readers
12 users here now

Big brain tech dude got yet another clueless take over at HackerNews etc? Here's the place to vent. Orange site, VC foolishness, all welcome.

This is not debate club. Unless it’s amusing debate.

For actually-good tech, you want our NotAwfulTech community

founded 2 years ago
MODERATORS
 

Sam "wrong side of FOSS history" Altman must be pissing himself.

Direct Nitter Link:

https://nitter.lucabased.xyz/jiayi_pirate/status/1882839370505621655

you are viewing a single comment's thread
view the rest of the comments
[–] V0ldek@awful.systems 20 points 2 weeks ago* (last edited 2 weeks ago) (2 children)

This is a really weird comment. Assembly is not faster than C, that's a nonsensical statement, C compiles down to assembly. LLVM's optimizations will most likely outperform or directly match whatever hand-crafted assembly you write. Why would BEQ 1000 be "considerably faster" than if (x == y) goto L_1000;? This collapses even further if you consider any application larger than a few hundred lines of code, any sensible compiler is going to beat you on optimizations if you try to write hand-crafted assembly. Try loading up assembly code and manually performing intraprocedural optimizations, lol, there's a reason every compiled language goes through an intermediate representation.

Saying that C# is slower than C is also nonsensical, especially now that C# has built-in PGO it's very likely it could outperform an application written in C. C#'s JIT compiler is not somehow slower because it's flexible in terms of hardware, if anything that's what makes it fast. For example you can write a vectorized loop that will be JIT-compiled to the ideal fastest instruction set available on the CPU running the program, whereas in C or assembly you'd have to manually write a version for each. There's no reason to think that manual implementation would be faster than what the JIT comes up with at runtime, though, especially with PGO.

It's kinda like you're saying that a V12 engine is faster than a Ferrari and that they are both faster than a spaceship because the spaceship doesn't have wheels.

I know you're trying to explain this to a non-technical person but what you said is so terribly misleading I cannot see educational value in it.

[–] froztbyte@awful.systems 12 points 2 weeks ago

and one doesn't program GPUs with assembly (in the sense as it's used with CPUs)

[–] justOnePersistentKbinPlease@fedia.io 1 points 2 weeks ago (4 children)

I have have crafted assembly instructions and have made it faster than the same C code.

Particular to if statements, C will do things push and pull values from the stack which takes a small but occasionally noticeable amount of cycles.

[–] self@awful.systems 8 points 2 weeks ago (1 children)

Particular to if statements, C will do things push and pull values from the stack which takes a small but occasionally noticeable amount of cycles.

holy fuck. llvm in shambles

[–] bitofhope@awful.systems 6 points 2 weeks ago* (last edited 2 weeks ago)

Meanwhile I'm reverse engineering some very much not performance sensitive video game binary patcher program some guy made a decade ago and Ghidra interprets a string splitting function as a no-op because MSVC decided calling conventions are a spook and made up a new one at link time. And it was right to do that.

EDIT: Also me looking for audio data from another old video game, patiently waiting for my program to take about half an hour on my laptop every time I run it. Then I remember to add --release to cargo run and while the compilation takes three seconds longer, the runtime shrinks to about ten seconds. I wonder if the above guy ever tried adding -O2 to his CFLAGS?

load more comments (3 replies)