Help test out ThinLTO!

bindgen

Debug Compile Times

$ RUSTFLAGS='-C codegen-units=1' cargo +nightly build
    Finished dev [unoptimized + debuginfo] target(s) in 32.49 secs
$ RUSTFLAGS='-C codegen-units=16' cargo +nightly build
    Finished dev [unoptimized + debuginfo] target(s) in 24.12 secs

Release Compile Times

$ RUSTFLAGS='-C codegen-units=1' cargo +nightly build --release
    Finished release [optimized] target(s) in 102.96 secs
$ RUSTFLAGS='-C codegen-units=16 -Z thinlto' cargo +nightly build --release
    Finished release [optimized] target(s) in 63.29 secs

Release Runtimes (Building Stylo Bindings)

$ RUSTFLAGS='-C codegen-units=1' cargo +nightly test --release --features testing_only_libclang_4 sanity_check_can_generate_stylo_bindings
  time:   438.615 ms.	parse
  time:     0.004 ms.	process_replacements
  time:    12.593 ms.	deanonymize_fields
  time:   475.890 ms.	compute_whitelisted_and_codegen_items
  time:    38.554 ms.	compute_has_vtable
  time:    33.133 ms.	compute_has_destructor
  time:   156.722 ms.	find_used_template_parameters
  time:   111.814 ms.	compute_cannot_derive_debug
  time:     0.000 ms.	compute_cannot_derive_default
  time:   124.499 ms.	compute_cannot_derive_copy
  time:    34.317 ms.	compute_has_type_param_in_array
  time:     0.000 ms.	compute_has_float
  time:     0.000 ms.	compute_cannot_derive_hash
  time:     0.000 ms.	compute_cannot_derive_partialord_partialeq_or_eq
  time:   208.608 ms.	codegen
Generated Stylo bindings in: Duration { secs: 3, nanos: 724134097 }

$ RUSTFLAGS='-C codegen-units=16 -Z thinlto' cargo +nightly test --release --features testing_only_libclang_4 sanity_check_can_generate_stylo_bindings
  time:   422.057 ms.	parse
  time:     0.000 ms.	process_replacements
  time:    22.555 ms.	deanonymize_fields
  time:   518.159 ms.	compute_whitelisted_and_codegen_items
  time:    38.898 ms.	compute_has_vtable
  time:    39.674 ms.	compute_has_destructor
  time:   175.396 ms.	find_used_template_parameters
  time:   124.995 ms.	compute_cannot_derive_debug
  time:     0.000 ms.	compute_cannot_derive_default
  time:   130.400 ms.	compute_cannot_derive_copy
  time:    40.068 ms.	compute_has_type_param_in_array
  time:     0.000 ms.	compute_has_float
  time:     0.000 ms.	compute_cannot_derive_hash
  time:     0.000 ms.	compute_cannot_derive_partialord_partialeq_or_eq
  time:   222.699 ms.	codegen
Generated Stylo bindings in: Duration { secs: 3, nanos: 994839330 }