Repository navigation
Commit 677ad31
authored
[Fuzzing] Use random.randbytes in fuzz_opt.py (#9332)
make_random_input() previously generated random bytes using a Python
list comprehension calling random.randint(0, 255) up to 200,000 times
per input file (~18.5ms average per call). Replace this loop with
random.randbytes(input_size) (~0.3ms average per call, ~50x faster).
Steady-state throughput increases by +7.8% (3.08 -> 3.32 iters/s) for a
single worker and +7.4% (81.78 -> 87.85 iters/s) across 32 parallel
workers.1 parent a6ed9ad commit 677ad31
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
117 | | - | |
| 117 | + | |
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| |||
0 commit comments