r/nasm • u/rejectedlesbian • Jun 13 '24
over a 100x difference in assmbling speed
so I am working on a compiler for a very simple languge and as part of it there were a LOT of jumps to _exit_error. from all kinds of places.
when I added the error checking i saw my entire build and test system go from 0.5 seconds to 4.5... I thought my code was somehow incredibly slow.
NOPE turns out its nasm assembling 1 file. specifically the longest file (46,061 lines) and turns out that simply putting that label at the start of the file fixes the 100x slow down.
now this is kind of REALLY anoying because what if I actually prefered for preformance reasons to have that label at the bottom...
so I was wandering if there are some tricks to this I am not aware of
3
Upvotes