Skip to content

Conversation

@dishmaker
Copy link

Just for fun :)

current master:

thiserror/impl$ cargo llvm-lines --release | head -n 20
  Lines                Copies              Function name
  -----                ------              -------------
  84275                1964                (TOTAL)
   2351 (2.8%,  2.8%)     5 (0.3%,  0.3%)  thiserror_impl::expand::impl_enum::{{closure}}
   1992 (2.4%,  5.2%)     8 (0.4%,  0.7%)  alloc::collections::btree::node::Handle<alloc::collections::btree::node::NodeRef<alloc::collections::btree::node::marker::Mut,K,V,NodeType>,alloc::collections::btree::node::marker::KV>::split_leaf_data
   1650 (2.0%,  7.1%)     1 (0.1%,  0.7%)  thiserror_impl::fmt::<impl thiserror_impl::attr::Display>::expand_shorthand
   1626 (1.9%,  9.0%)     1 (0.1%,  0.8%)  thiserror_impl::attr::parse_token_expr
   1512 (1.8%, 10.8%)     1 (0.1%,  0.8%)  alloc::collections::btree::node::BalancingContext<K,V>::bulk_steal_left
   1459 (1.7%, 12.6%)     4 (0.2%,  1.0%)  thiserror_impl::expand::impl_struct::{{closure}}
   1433 (1.7%, 14.3%)    35 (1.8%,  2.8%)  <alloc::boxed::Box<T,A> as core::ops::drop::Drop>::drop
   1373 (1.6%, 15.9%)     4 (0.2%,  3.0%)  alloc::collections::btree::node::Handle<alloc::collections::btree::node::NodeRef<alloc::collections::btree::node::marker::Mut,K,V,alloc::collections::btree::node::marker::Leaf>,alloc::collections::btree::node::marker::Edge>::insert
   1333 (1.6%, 17.5%)     1 (0.1%,  3.1%)  thiserror_impl::expand::impl_enum
   1294 (1.5%, 19.0%)     4 (0.2%,  3.3%)  alloc::collections::btree::node::Handle<alloc::collections::btree::node::NodeRef<alloc::collections::btree::node::marker::Mut,K,V,alloc::collections::btree::node::marker::Internal>,alloc::collections::btree::node::marker::Edge>::insert
   1182 (1.4%, 20.4%)    10 (0.5%,  3.8%)  alloc::collections::btree::node::NodeRef<BorrowType,K,V,Type>::ascend
   1060 (1.3%, 21.7%)     4 (0.2%,  4.0%)  alloc::collections::btree::node::Handle<alloc::collections::btree::node::NodeRef<alloc::collections::btree::node::marker::Mut,K,V,alloc::collections::btree::node::marker::Leaf>,alloc::collections::btree::node::marker::Edge>::insert_recursing
   1050 (1.2%, 22.9%)     7 (0.4%,  4.3%)  alloc::collections::btree::search::<impl alloc::collections::btree::node::NodeRef<BorrowType,K,V,alloc::collections::btree::node::marker::LeafOrInternal>>::search_tree
    996 (1.2%, 24.1%)     1 (0.1%,  4.4%)  thiserror_impl::expand::impl_struct
    958 (1.1%, 25.2%)     5 (0.3%,  4.6%)  alloc::collections::btree::node::NodeRef<alloc::collections::btree::node::marker::Mut,K,V,alloc::collections::btree::node::marker::Internal>::push
    939 (1.1%, 26.4%)     4 (0.2%,  4.8%)  alloc::collections::btree::node::Handle<alloc::collections::btree::node::NodeRef<alloc::collections::btree::node::marker::Mut,K,V,alloc::collections::btree::node::marker::Internal>,alloc::collections::btree::node::marker::Edge>::insert_fit
    840 (1.0%, 27.3%)     6 (0.3%,  5.1%)  <F as syn::parse::Parser>::parse2

vec version:

thiserror/impl$ cargo llvm-lines --release | head -n 20

  Lines                Copies              Function name
  -----                ------              -------------
  54111                1584                (TOTAL)
   2344 (4.3%,  4.3%)     5 (0.3%,  0.3%)  thiserror_impl::expand::impl_enum::{{closure}}
   1704 (3.1%,  7.5%)     1 (0.1%,  0.4%)  thiserror_impl::fmt::<impl thiserror_impl::attr::Display>::expand_shorthand
   1626 (3.0%, 10.5%)     1 (0.1%,  0.4%)  thiserror_impl::attr::parse_token_expr
   1454 (2.7%, 13.2%)     4 (0.3%,  0.7%)  thiserror_impl::expand::impl_struct::{{closure}}
   1315 (2.4%, 15.6%)     1 (0.1%,  0.8%)  thiserror_impl::expand::impl_enum
   1118 (2.1%, 17.7%)    26 (1.6%,  2.4%)  <alloc::boxed::Box<T,A> as core::ops::drop::Drop>::drop
    977 (1.8%, 19.5%)     1 (0.1%,  2.5%)  thiserror_impl::expand::impl_struct
    840 (1.6%, 21.0%)     6 (0.4%,  2.8%)  <F as syn::parse::Parser>::parse2
    776 (1.4%, 22.5%)     4 (0.3%,  3.1%)  thiserror_impl::generics::InferredBounds::insert
    771 (1.4%, 23.9%)     1 (0.1%,  3.2%)  thiserror_impl::scan_expr::scan_expr
    688 (1.3%, 25.2%)    14 (0.9%,  4.0%)  alloc::vec::Vec<T,A>::push_mut
    675 (1.2%, 26.4%)    15 (0.9%,  5.0%)  <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::next
    643 (1.2%, 27.6%)     1 (0.1%,  5.1%)  thiserror_impl::attr::parse_error_attribute::{{closure}}
    600 (1.1%, 28.7%)     6 (0.4%,  5.4%)  <T as alloc::slice::<impl [T]>::to_vec_in::ConvertVec>::to_vec
    513 (0.9%, 29.7%)     7 (0.4%,  5.9%)  core::iter::traits::iterator::Iterator::try_fold
    510 (0.9%, 30.6%)     6 (0.4%,  6.2%)  <core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::position
    452 (0.8%, 31.4%)     6 (0.4%,  6.6%)  syn::parse::ParseBuffer::step

@dishmaker dishmaker closed this Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant