Call from REPL vs direct call

Hello, I’m new to Julia and I’m finding some things that I find surprising when it comes to performance (probably due to my lack of Julia knowledge). In this case I have a module and when I open the Julia REPL in its directory, activate the module in Pkg and then do using MyModule; @time MyModule.test() I get twice the time and allocations compared to simply going into the source directory and calling julia MyModule.jl (with a call to @time test() in the script’s global scope) from the shell. From my understanding there shouldn’t be a difference between those two, where is the mistake in my thinking?

Not sure if this is helpful but in case it’s needed: The function itself doesn’t do any fancy stuff, it reads in a 300 MB binary file and does some calculations on the data.