Which is the equivalent of @btime/ @benchmark in Python?
I would like something to interactively benchmark a single expression (function call) and where the number of run adapt to the running cost of the expression to benchmark.
It’s crazy how little there is about this in Python… I was convinced to find something like this in seconds, instead the best out there seems to get the current time before and after and subtract, or profile a whole script using command line tools…
Th beauty of @BenchmarkTools is that it is so simple, just @btime ...code.. and you are done, no need to create a struct for the number of times to run the code, the name of the benchmark… sometimes it’s ok, but most of the time I just need a quick benchmark, and that’s what BenchmarkTools provides, but crazy I can’t find something similar in Python…