Easily make all variables 32 bit?

is there some way to force all implicitly declared variables from 64 to 32 bit? I know I can explicitly declare stuff as 32bit and write numbers as 1.0f0. But I’d like to test the accuracy I lose in my 64 bit code (and performance I gain) when running in 32 bit mode (same hardware) without having to rewrite every single number and explicitly declare every single variable. Obviously, I’m expecting I’ll have to modify everything that is explicitly declared.
Some global var or setting maybe?
Thanks a lot!

It sounds like GitHub - stevengj/ChangePrecision.jl: macro to change the default floating-point precision in Julia code should fit your use case.


Yep, sounds like it’s exactly what I need! Thanks!