Linus Torvalds Takes On A Performance Patch: "I Relax By Playing With Inline Assembly"

3 years ago by snaggen to c/programming

Yes, who haven't had a glass of red wine, relaxing music and some inline assembly....

lowleveldata 36 points 3 years ago

I relax by listening to my HDD spinning. Which technically is a lower level than assembly.

path: 0 596213, hotness: undefined, score: 36, children: 2
catch22 22 points 3 years ago path: 0 596213 604211, hotness: undefined, score: 22, children: 0
razza856 1 point 3 years ago

that sound arouses me tbh

path: 0 596213 704722, hotness: undefined, score: 1, children: 0
sethboy66 31 points 3 years ago

He says this because he kind of ignorantly (his own wordage) wrote in machine code for quite some time before realizing assembly was a thing. So for Linus inline assembly is to machine code as python is to c for a lot of us.

path: 0 593883, hotness: undefined, score: 31, children: 4
mrkite 2 points 3 years ago

One of my oldest programming books is all about using machine language to program.

https://vintageapple.org/...

At the time, even assemblers cost money. I remember saving up for Merlin which is an assembler for the Apple II.

path: 0 593883 645758, hotness: undefined, score: 2, children: 0
jormaig 1 point 3 years ago

What does he mean by machine code? Like assembly files or literally 1s and 0s?

path: 0 593883 625624, hotness: undefined, score: 1, children: 2
Hexarei 2 points 3 years ago

He didn't realize assembly was a thing, so he was actually writing machine code instructions

path: 0 593883 625624 634832, hotness: undefined, score: 2, children: 0
solidsnail 2 points 3 years ago

He was probably working with bytes and not individual bits, but yeah. He basically wrote executables directly (to my understanding).

path: 0 593883 625624 637477, hotness: undefined, score: 2, children: 0
spike -13 points 3 years ago

As usual his code might be a great thing, but his pretentious attitude is still shit.

"Ah yes look at me I have written, oh my dare I say, some ASSEMBLY honhonhonhonhonhon"

That this is a big thing seems wild to me.

Assembly isn't such a big thing, some devs use it daily (Hello to my embedded devs out there) so why is this worthy a news article?

path: 0 622278, hotness: undefined, score: -13, children: 4
Deathcrow 17 points 3 years ago

the dude wrote a kernel, I very much doubt he needs to brag about his ability to write assembly.

path: 0 622278 624477, hotness: undefined, score: 17, children: 1
spike -6 points 3 years ago

I know. He's a legend. And I respect his work. He doesn't need to brag.

And yet he does.

path: 0 622278 624477 625559, hotness: undefined, score: -6, children: 0
solidsnail 7 points 3 years ago

That's not being pretentious, that's being blunt. I personally as a dev, appreciate that.

If you think the code can be improved you should say that, and exactly why that's the case. When you're mistaken you should be able to take the criticism.

Your mission as a dev is to write the ideal code, and being overly polite can stand in the way of that.

path: 0 622278 637705, hotness: undefined, score: 7, children: 0
platypus_plumba 2 points 3 years ago
path: 0 622278 949881, hotness: undefined, score: 2, children: 0
letsgoshopping -35 points 3 years ago
path: 0 594516, hotness: undefined, score: -35, children: 20
snaggen 21 points 3 years ago

To be fair, he merged the original version and not his own.... at least not yet until it have been properly tested.

path: 0 594516 594697, hotness: undefined, score: 21, children: 19
letsgoshopping -32 points 3 years ago
path: 0 594516 594697 596259, hotness: undefined, score: -32, children: 18
gnus_migrate 26 points 3 years ago

Proofs of concept are a very common thing everywhere. Sometimes it's easier just to show code instead of explaining everything, which was the case here.

path: 0 594516 594697 596259 596675, hotness: undefined, score: 26, children: 17
letsgoshopping -43 points 3 years ago
path: 0 594516 594697 596259 596675 596676, hotness: undefined, score: -43, children: 16
programming
programming

@programming.dev

login for more options
28869
3732
3340

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev


go to feed...