Dynamically swapping between two algorithms
Ethan Furman
ethan at stoneleaf.us
Thu Sep 25 23:11:43 EDT 2014
On 09/23/2014 07:48 AM, Steven D'Aprano wrote:
>
> alas, the CUTOVER point is likely to be machine-dependent. Take it as a
> given that inserting a fixed CUTOVER point into the source code (say,
> ``CUTOVER = 123456``) is not likely to be very effective, and dynamically
> calculating it at import time is impractical.
Have your setup script do some timings to figure out where CUTOFF is on any particular machine. You can then store it
in a .conf file, or directly modify the source file with the value, or ...
--
~Ethan~
More information about the Python-list
mailing list