

If you use the profiler and see that the slower operation is being used frequently, and is taking up a chunk of time deemed significant, why not swap it to the faster version?
In a simulation I’m working on that goes through 42 million rounds I spent some time profiling and going through the code that was eating up a lot of time (especially things executed all 42 million times) and trying to find some optimizations. Brought the run time down from about 10 minutes to 5 minutes.
I certainly wasn’t going to start over in C++ or Rust, and if I’d started with either of those languages I would have missed out on a lot of really strong Python libraries and probably spent more time coding rather than refining the simulation.


It doesn’t taste the same. The lactase breaks the less sweet lactose into glucose and galactose, which are about twice as sweet as lactose (all are less sweet than table sugar.)
Also lactose free milk is typically ultra pasteurized, which gives it the longer shelf life, but ultra pasteurization does impact taste. It gives it a “cooked” flavor.