trace: don't use randombytes_buf(), use pseudorand.
This is much faster to give 64 bits of data, and we don't need cryptographic randomness. This brings us back to 413ns per trace. Before: real 0m5.819000-6.472000(6.2064+/-0.26)s user 0m3.779000-4.101000(3.956+/-0.12)s sys 0m2.040000-2.431000(2.2496+/-0.15)s After: real 0m3.981000-4.247000(4.1276+/-0.11)s user 0m3.979000-4.245000(4.126+/-0.11)s sys 0m0.000000-0.002000(0.001+/-0.00063)s Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: lightingd: trimmed overhead of tracing infrastructure.
This commit is contained in:
@@ -118,6 +118,7 @@ common/test/run-splice_script: \
|
||||
common/test/run-trace: \
|
||||
common/amount.o \
|
||||
common/memleak.o \
|
||||
common/pseudorand.o \
|
||||
common/trace.o \
|
||||
wire/fromwire.o \
|
||||
wire/towire.o
|
||||
|
||||
Reference in New Issue
Block a user