]> git.lizzy.rs Git - rust.git/commit
Auto merge of #32236 - alexcrichton:better-compile-intrinsics, r=arielb1
authorbors <bors@rust-lang.org>
Wed, 16 Mar 2016 02:41:01 +0000 (19:41 -0700)
committerbors <bors@rust-lang.org>
Wed, 16 Mar 2016 02:41:01 +0000 (19:41 -0700)
commit0986d645b9d3f01e102c84fb91abf42de00e7b28
tree21ec6b77b757de5db7af56084b04a6523059f9db
parentc66d2380a810c9a2b3dbb4f93a830b101ee49cc2
parent87ede2da549632de443859c8e08f0c977849d8b7
Auto merge of #32236 - alexcrichton:better-compile-intrinsics, r=arielb1

rustc: Improve compile time of platform intrinsics

This commit improves the compile time of `rustc_platform_intrinsics` from 23s to
3.6s if compiling with `-O` and from 77s to 17s if compiling with `-O -g`. The
compiled rlib size also drops from 3.1M to 1.2M.

The wins here were gained by removing the destructors associated with `Type` by
removing the internal `Box` and `Vec` indirections. These destructors meant that
a lot of landing pads and extra code were generated to manage the runtime
representations. Instead everything can basically be statically computed and
shoved into rodata, so all we need is a giant string compare to lookup what's
what.

Closes #28273