Live data from Hacker News

Assembly Hall of Shame

github.com

21–30 of 104 posts

Re: Assembly Hall of Shame

#21

Very cool! Also, huh interesting. I’ve used rdtsc to measure cycle diffs but had no idea its execution takes that long. Is that common across architectures?

AFAIK it acts as some kind of execution barrier, to give meaningful timing.

Re: Assembly Hall of Shame

#22
post #21

Very cool! Also, huh interesting. I’ve used rdtsc to measure cycle diffs but had no idea its execution takes that long. Is that common across architectures?

AFAIK it acts as some kind of execution barrier, to give meaningful timing.

Isn't that rdtscp ( https://www.felixcloutier.com/x86/rdtscp )?

Re: Assembly Hall of Shame

#23
post #5

This author also has other things like: A compiler that emits only `mov` instructions and another compiler that deliberately messes with the control flow so that, if disassembled, common debuggers will draw symbols like skulls or threats. https://github.com/xoreaxeaxeax/repsych

He also bruteforced the entire opcode space to find undocumented instructions (sandsifter).

Re: Assembly Hall of Shame

#24

what im seeing from this chart is that we should be using the nop instruction for everything

Well the best code is no code. Nop could be second best though.

Instructions unclear. Set the NX bit to ensure no code, and got a general protection fault.

Re: Assembly Hall of Shame

#25
post #6

It’s crazy how computers still seem to get perceivably slow every few years, given how many instructions can be executed in 1ms. Shameful, even.. What’s that law called about programmers wasting all the compute on abstraction?

Andy and Bill's Law

Re: Assembly Hall of Shame

#26
post #6

It’s crazy how computers still seem to get perceivably slow every few years, given how many instructions can be executed in 1ms. Shameful, even.. What’s that law called about programmers wasting all the compute on abstraction?

Wirth's Law I believe.

And remember to call him by name, not by value!

Re: Assembly Hall of Shame

#28
post #13

Earlier quoted context omitted.

Huh? A millisecond is an eternity!

I remember reading once somewhere: If some app responds in 10ms or less, it is INTERACTIVE . makes you think.

It is literally impossible to respond to input in 10ms on most platforms, for various reasons. The USB input lag of 12-30ms and the 60Hz refresh rate of most monitors being just the first two.
Post reply on HN