ejrgilbert / whamm

5 stars 2 forks source link

make it run faster #23

Open ejrgilbert opened 1 month ago

ejrgilbert commented 1 month ago

I'm guessing that it's running slowly with the behavior tree because of having to clone the probe each time it processes a new instruction, try seeing if it's possible to remove the clone, or at least, just clone the predicate.

ahuoguo commented 2 weeks ago

Some docs on the flame graph.

> cargo install --locked samply
> samply record whamm instr --script tests/scripts
/fault_injection/dfinity/dfinity_async_strcmp_fn.mm --app tests/apps/dfinity/users.wasm

image 94% of the time is spent on the two regex functions in define_compiler_var. My guess is the bad time complexity of doing regex matches for the entire wasm file (since it's worst-case exponential as I recall people doing DoS attacks with regex matching).