Skip to content
Permalink
Browse files

Upgrade to rustc 1.36.0-nightly (e305df184 2019-04-24)

This includes a `size_of` regression for a few DOM types,
due to rust-lang/rust#58623 which replaces the
implementation of `HashMap` in the standard library to Hashbrown.

Although `size_of<HashMap>` grows, it’s not obvious how total memory usage
is going to be impacted: Hashbrown only has one `u8` instead of one `usize`
of overhead per hash table bucket for storing (part of) a hash,
and so might allocate less memory itself.

Hashbrown also typically has better run time performance:
https://github.com/rust-lang/hashbrown#performance

Still, I’ve filed rust-lang/hashbrown#69
about potentially reducing the `size_of<HashMap>` regression.
  • Loading branch information...
SimonSapin committed Apr 25, 2019
1 parent 07d1559 commit 51d6b6350efd518fea1cf6f100e91fc9486ca30b
Showing with 22 additions and 22 deletions.
  1. +12 −12 Cargo.lock
  2. +1 −1 components/style_derive/animate.rs
  3. +1 −1 rust-toolchain
  4. +8 −8 tests/unit/script/size_of.rs

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -25,7 +25,7 @@ pub fn derive(mut input: DeriveInput) -> TokenStream {
let s = Structure::new(&input);
let mut append_error_clause = s.variants().len() > 1;

let mut match_body = s.variants().iter().fold(quote!(), |body, variant| {
let match_body = s.variants().iter().fold(quote!(), |body, variant| {
let arm = match derive_variant_arm(variant, &mut where_clause) {
Ok(arm) => arm,
Err(()) => {
@@ -1 +1 @@
nightly-2019-04-18
nightly-2019-04-25
@@ -29,11 +29,11 @@ macro_rules! sizeof_checker (
);

// Update the sizes here
sizeof_checker!(size_event_target, EventTarget, 40);
sizeof_checker!(size_node, Node, 184);
sizeof_checker!(size_element, Element, 432);
sizeof_checker!(size_htmlelement, HTMLElement, 448);
sizeof_checker!(size_div, HTMLDivElement, 448);
sizeof_checker!(size_span, HTMLSpanElement, 448);
sizeof_checker!(size_text, Text, 216);
sizeof_checker!(size_characterdata, CharacterData, 216);
sizeof_checker!(size_event_target, EventTarget, 56);
sizeof_checker!(size_node, Node, 200);
sizeof_checker!(size_element, Element, 448);
sizeof_checker!(size_htmlelement, HTMLElement, 464);
sizeof_checker!(size_div, HTMLDivElement, 464);
sizeof_checker!(size_span, HTMLSpanElement, 464);
sizeof_checker!(size_text, Text, 232);
sizeof_checker!(size_characterdata, CharacterData, 232);

0 comments on commit 51d6b63

Please sign in to comment.
You can’t perform that action at this time.