Closed RazrFalcon closed 4 years ago
This patch replaces Pread derive with manual implementations. It makes the source code a bit bigger, but reduces the compilation time at least by half on my CPU.
Pread
Multi-threaded build:
# before > cargo clean; cargo build --release Compiling ... Finished release [optimized] target(s) in 7.55s #after > cargo clean; cargo build --release Compiling ... Finished release [optimized] target(s) in 4.26s
Single-threaded build:
# before > cargo clean; cargo build --release Compiling ... Finished release [optimized] target(s) in 32.05s #after > cargo clean; cargo build --release Compiling ... Finished release [optimized] target(s) in 14.80s
Build on CI takes 49.29s instead 58.35s of now. Not sure why the difference is that small.
PS: I understand that this is a controversial patch.
Nice!
This patch replaces
Pread
derive with manual implementations. It makes the source code a bit bigger, but reduces the compilation time at least by half on my CPU.Multi-threaded build:
Single-threaded build:
Build on CI takes 49.29s instead 58.35s of now. Not sure why the difference is that small.
PS: I understand that this is a controversial patch.