from the post it isn't clear if the problem is in lazy_static or in the initialization of the big int from a number instead of from a word. Should I initialize all of them every time I need them? Looks like parsing a string every time I need the number is not ok.
The post suggests using an ordinary integer whenever you need to use seven in an operation, since BigDecimal supports operators where the other side is an ordinary integer.
indeed it works. So this is the penalty, this wrapper type?
Should I instead make an instantiable object that generates the big decimals on the first run? This is odd for math functions but I think this is the only way to make it fast
Rust by design doesn't run any code before main, so lazy_static initializes global values when you first use them. There is a cost of a check if it's initialized when you access it.