This PR adds support to load a new story file without having to recreate a new FrotzEnv instance, thus avoiding creating and loading copies of libfrotz.so. That feature helps reduce the overhead of loading different games numerous times (e.g. meta-learning across different games).
This PR also adds support to load a story file from memory in libfrotz.so.
Running tests/benchmark.py on my laptop I get a speedup of ~5.8x.
Calling FrotzEnv(905.z5) 1000 times in 6.71 secs.
Calling env.load(905.z5) 1000 times in 1.15 secs.
This PR adds support to load a new story file without having to recreate a new FrotzEnv instance, thus avoiding creating and loading copies of
libfrotz.so
. That feature helps reduce the overhead of loading different games numerous times (e.g. meta-learning across different games).This PR also adds support to load a story file from memory in
libfrotz.so
.Running
tests/benchmark.py
on my laptop I get a speedup of ~5.8x.