2019-05-31 12:23:13 -04:00
|
|
|
image: ubuntu/latest
|
|
|
|
packages:
|
|
|
|
- curl
|
|
|
|
- libegl1-mesa-dev
|
|
|
|
- libgles2-mesa-dev
|
|
|
|
- pkg-config
|
|
|
|
- libssl-dev
|
|
|
|
sources:
|
|
|
|
- https://github.com/iceiix/stevenarella
|
|
|
|
tasks:
|
|
|
|
- setup: |
|
|
|
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
|
|
|
|
sh ./rustup.sh -y
|
|
|
|
source $HOME/.cargo/env
|
blocks: split macro into multiple functions, fast! (#267)
Improves fix for #184, whereas #255 reduced optimizations,
we now address the underlying compiler limitation and split out
the one massive lazy_static! initialization function, into
one function per block in the block_registration_functions module.
Previous build time, with opt-level=1:
% time cargo build --release
Compiling steven_blocks v0.0.1
Finished release [optimized] target(s) in 21.24s
cargo build --release 31.80s user 0.71s system 152% cpu 21.276 total
With this change, opt-level=3 and the function splitting fix:
% time cargo build --release
Compiling steven_blocks v0.0.1
Finished release [optimized] target(s) in 30.80s
cargo build --release 40.26s user 0.86s system 133% cpu 30.850 total
Full optimizations are expectedly slightly slower, but this is still
much much _much_ faster than before this refactoring, where this crate
would take up to an unbelievable 5 hours (and tens of GB of RAM). Long
story short, we're now back to full optimizations and stable Rust.
Thanks to dtolnay on the Rust programming language forum for suggesting
this technique, https://users.rust-lang.org/t/5-hours-to-compile-macro-what-can-i-do/36508/2
2020-01-09 23:08:28 -05:00
|
|
|
cargo --version
|
2019-05-31 12:23:13 -04:00
|
|
|
- build: |
|
|
|
|
source $HOME/.cargo/env
|
|
|
|
cd stevenarella
|
blocks: split macro into multiple functions, fast! (#267)
Improves fix for #184, whereas #255 reduced optimizations,
we now address the underlying compiler limitation and split out
the one massive lazy_static! initialization function, into
one function per block in the block_registration_functions module.
Previous build time, with opt-level=1:
% time cargo build --release
Compiling steven_blocks v0.0.1
Finished release [optimized] target(s) in 21.24s
cargo build --release 31.80s user 0.71s system 152% cpu 21.276 total
With this change, opt-level=3 and the function splitting fix:
% time cargo build --release
Compiling steven_blocks v0.0.1
Finished release [optimized] target(s) in 30.80s
cargo build --release 40.26s user 0.86s system 133% cpu 30.850 total
Full optimizations are expectedly slightly slower, but this is still
much much _much_ faster than before this refactoring, where this crate
would take up to an unbelievable 5 hours (and tens of GB of RAM). Long
story short, we're now back to full optimizations and stable Rust.
Thanks to dtolnay on the Rust programming language forum for suggesting
this technique, https://users.rust-lang.org/t/5-hours-to-compile-macro-what-can-i-do/36508/2
2020-01-09 23:08:28 -05:00
|
|
|
cargo build
|
|
|
|
cargo test
|