| 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 ssl
import pyperf
bio = ssl.MemoryBIO()
def bench(size):
bio.write(b'x' * size)
data = bio.read(size)
if len(data) != size:
raise Exception
runner = pyperf.Runner()
for size in (1, 10, 100, 1_000, 10_000):
runner.bench_func(f'read {size:,}B', bench, size)Result:
Benchmark hidden because not significant (1): read 10,000B |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Replace PyBytes_FromStringAndSize(NULL, size) and _PyBytes_Resize() with the new public PyBytesWriter API.