Skip to content

Commit

Permalink
Upgrade to rustc 1.36.0-nightly (e305df184 2019-04-24)
Browse files Browse the repository at this point in the history
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 51d6b63
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 22 deletions.
24 changes: 12 additions & 12 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion components/style_derive/animate.rs
Expand Up @@ -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(()) => {
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain
@@ -1 +1 @@
nightly-2019-04-18
nightly-2019-04-25
16 changes: 8 additions & 8 deletions tests/unit/script/size_of.rs
Expand Up @@ -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.