-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cargo.toml
36 lines (29 loc) · 1009 Bytes
/
Cargo.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
[package]
name = "hq9c"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
clap = { version = "3.2.17", features = ["derive"] }
tempfile = "3.3.0"
# VITAL SPEED OPTIMIZATION
[profile.release]
opt-level = "s"
strip = "debuginfo"
debug-assertions = false
debug = false
lto = "fat"
panic = "abort"
codegen-units = 1
# This changes to the release will produce a slower compilation, but will gain runtime performance. In my machine the changes were this:
# release:
#
# $ time ./target/release/hq9c -o test test.hq9p
#
# ./target/debug/hq9c -o test test.hq9p 0.15s user 0.06s system 106% cpu 0.199
#
# debug:
# $ time ./target/release/hq9c -o test test.hq9p
#
# ./target/debug/hq9c -o test test.hq9p 0.15s user 0.07s system 108% cpu 0.198
# As we can see, we gained 0.01 system seconds, 2% cpu usage and 0.001 points. In general this is a success, just with 7.5 seconds of difference between debug and release!