toot.wales is one of the many independent Mastodon servers you can use to participate in the fediverse.
We are the Open Social network for Wales and the Welsh, at home and abroad! Y rhwydwaith cymdeithasol annibynnol i Gymru, wedi'i bweru gan Mastodon!

Administered by:

Server stats:

665
active users

i love* stack overflow. i love how when you wanna know if a comparison to zero is faster than other numbers, one of the top comments will always be some shit like "This level of optimization is not worthwhile"

and fuck you man. i am doing this comparison millions of times a second because i'm writing a blitter or im writing an interpreter or im writing something else where small gains add the fuck up, maybe on underpowered embedded or otherwise old hardware, so no actually, you utter enterprise brainworm poisoned asshole, it is actually worthwhile and i resent that you're making it *my* problem that *you've* never worked on a goddamn thing in your life where performance actually fucking mattered

Giles Goat

@eniko I'll reply you with :

OR A
JR Z, ....

Of course "comparision with 0 is faster", comparision with ANY other numbers at all effects is a subtraction with discarded result.

So CMP A,'12' is at all effects

SUB A,12
JR Z, ...

Much faster a 0 comparision.

BUT .. is the compiler that clever to know you are doing it or will it replace with

SUB A,0

?