News for hackers. Stuff that matters.
Re:How to Read Assembly Language by waynesonfire on Tuesday March 02, 2021 @10:36AM (#26316352)
I've heard of people writing custom assembly to get more performance... what level of assembly expertise is required to achieve that? And, what does that look like?

Do you let the compiler emit assembly code and then start editing it to make it faster? Or, does it start from scratch? Are there known areas that the compiler has troubles with?

Re:How to Read Assembly Language by chrisseaton on Tuesday March 02, 2021 @10:40AM (#26316397)
It's almost never 'assembly expertise' - it's architecture expertise - knowing a specific instruction you want to use in a specific way to get some kind of fusion or fill some functional unit using some knowledge that the compiler doesn't have.

The actual mechanics of how to write a program in assembly are trivial if you already know a language like C.

Re:How to Read Assembly Language by retrac on Tuesday March 02, 2021 @03:28PM (#26320173)
> trivial if you already know a language like C

The few times I've been stuck writing code for a platform without access to a compiler, I just wrote it in pseudo-C then hand-compiled it. Once I got comfortable I could "compile" on full mental autopilot, checked out and watching TV at the same time. But it's horribly dull work, like doing arithmetic by hand.