pyperformance
pyperformance copied to clipboard
Add benchmarks for ctypes function call overhead
This additionally adds support for building C extensions as part of creating a benchmark's virtual environment, since that didn't seem to be possible prior to this change.
See https://github.com/faster-cpython/ideas/issues/370 for some background discussion.
Wanted to add a note: This is definitely a "microbenchmark" that isn't a great example of a real-world workload.
LGTM, but I am a bit concerned that benchmarking all of the call argtypes in one iteration can hide regressions, but I can't think of anyway to fix that apart from splitting this benchmark further to each call argtypes.