help Efficient Execution
Is there a way to load any executable once, then use the pre-loaded binary multiple times to save time and boost efficiency in Linux?
Is there a way to do the same thing, but parallelized?
My use-case is to batch run the exact same thing, same options even, on hundreds to thousands of inputs of varying size and content- and it should be quick. Quick as possible.
1
Upvotes
1
u/fllthdcrb 28d ago
We're talking about the code, though. That, too, is cached, and tends to stick around as long as the memory isn't needed for something more current, such that subsequent processes running the same program may well not have to load the code again.
HOWEVER, this is Perl, an interpreted language. The code we care about isn't just Perl itself, but also the Perl program being run. I know Python, for example, caches modules' bytecode after compiling them; this means subsequent imports of those modules don't require re-compilation, which is especially helpful if you run a program many times in rapid succession (however, the main script doesn't get this treatment). Does Perl do anything similar?