Loading over 5k functions from a .nkg file goes from 49 functions/second to *~928~ 1,331 functions/second**!
Thanks to @young-x-skyee for most of the work on this — I just cherry-picked commits from the kymata-language branch, and tidied up the code a little, and added/fixed tests
Main changes
[x] New permitted and more performant argument format for ExpressionSet.__init__().
[x] Update load_nkg to use new format to benefit from the speedups
[x] Documentation for new format.
Added to ExpressionSet.__init__() docstring.
[x] Tests for new argument format.
[x] Refactored combine() to use new format and benefit from the speedups.
[x] Refactored ExpressionSet.__add__() to use the new format and benefit from the speedups.
Fixes #271
Loading over 5k functions from a .nkg file goes from 49 functions/second to *~928~ 1,331 functions/second**!
Thanks to @young-x-skyee for most of the work on this — I just cherry-picked commits from the
kymata-language
branch, and tidied up the code a little, and added/fixed testsMain changes
ExpressionSet.__init__()
.load_nkg
to use new format to benefit from the speedupsExpressionSet.__init__()
docstring.combine()
to use new format and benefit from the speedups.ExpressionSet.__add__()
to use the new format and benefit from the speedups.*: on my laptop