| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Replace PyBytes_FromStringAndSize(NULL, size) and _PyBytes_Resize() with the new public PyBytesWriter API.
|
Benchmark: import pyperf
import os
file = open(__file__, "rb", 0)
def func():
file.seek(0)
for _ in range(100):
file.read(1)
runner = pyperf.Runner()
runner.bench_func('bench', func)
file.close()Result: Mean +- std dev: [ref] 65.8 us +- 1.0 us -> [change] 63.2 us +- 1.0 us: 1.04x faster cc @cmaloney |
Sorry, something went wrong.
|
Merged. Thanks for the review @cmaloney. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Replace PyBytes_FromStringAndSize(NULL, size) and _PyBytes_Resize() with the new public PyBytesWriter API.