top | item 43869560

(no title)

stassats | 10 months ago

>(safety 0)

Please, don't do that!

discuss

order

BoingBoomTschak|10 months ago

True, this was initially for the sake of benchmarking. Very bad idea, especially since it doesn't really benefit here.

sauercrowd|10 months ago

Why's that? What does it do?

aidenn0|10 months ago

The Lisp standard allows it to be implementation dependent, but in SBCL (which I believe the author of TFA is using), it disables all runtime type and bounds checking. This usually speeds things up negligibly[1] in exchange for allowing all kinds of undefined behavior.

1: If it speeds things up non-negligibly, there's almost always a way to get a similar speedup without setting safety to 0; e.g. if you check your types outside of your hot loops, the compiler is smart enough to omit type-checks inside the loop.