Skip to content

Instantly share code, notes, and snippets.

@juliand665
Last active November 24, 2022 15:42
Show Gist options
  • Save juliand665/8948233f08f795b7eaade82076ea4fde to your computer and use it in GitHub Desktop.
Save juliand665/8948233f08f795b7eaade82076ea4fde to your computer and use it in GitHub Desktop.
most common calls to `core::mem::size_of` by type argument, among top 1000 crates on crates.io
181x align_of::<T>
91x align_of::<A>
90x align_of::<B>
21x align_of::<parking_lot_core::word_lock::ThreadData>
19x align_of::<usize>
18x align_of::<crossbeam_epoch::atomic::Array<T>>
16x align_of::<tokio::runtime::task::core::Trailer>
16x align_of::<tokio::runtime::task::core::Core<T, S>>
15x align_of::<<A as Array>::Item>
14x align_of::<*const Inner>
14x align_of::<*const Self>
14x align_of::<*mut Inner>
14x align_of::<*mut Self>
14x align_of::<hashbrown::raw::sse2::Group>
14x align_of::<hashbrown::raw::inner::sse2::Group>
10x align_of::<bytes::bytes::Shared>
10x align_of::<inotify_sys::inotify_event>
8x align_of::<S>
8x align_of::<F>
8x align_of::<&[usize]>
6x align_of::<core::sync::atomic::AtomicUsize>
6x align_of::<U>
6x align_of::<sized_chunks::inline_array::InlineArray<A, T>>
4x align_of::<string_cache::dynamic_set::Entry>
4x align_of::<i64>
4x align_of::<u16>
4x align_of::<i8>
4x align_of::<f32>
4x align_of::<i32>
4x align_of::<i16>
4x align_of::<u32>
4x align_of::<f64>
4x align_of::<u64>
3x align_of::<bumpalo::ChunkFooter>
3x align_of::<secp256k1_sys::types::AlignedType>
2x align_of::<portable_atomic::AtomicU32>
2x align_of::<vsdbsled::pagecache::pagetable::Node1>
2x align_of::<portable_atomic::AtomicUsize>
2x align_of::<portable_atomic::AtomicU8>
2x align_of::<portable_atomic::AtomicU64>
2x align_of::<&[T]>
2x align_of::<portable_atomic::AtomicU16>
2x align_of::<portable_atomic::AtomicU128>
2x align_of::<&usize>
2x align_of::<erased_serde::any::Value>
2x align_of::<portable_atomic::AtomicBool>
2x align_of::<portable_atomic::AtomicI128>
2x align_of::<portable_atomic::AtomicI16>
2x align_of::<portable_atomic::AtomicI32>
2x align_of::<portable_atomic::AtomicI64>
2x align_of::<portable_atomic::AtomicI8>
2x align_of::<portable_atomic::AtomicIsize>
2x align_of::<portable_atomic::AtomicPtr<()>>
2x align_of::<vsdbsled::pagecache::pagetable::Node2>
1x align_of::<std::io::error::SimpleMessage>
1x align_of::<std::io::error::Custom>
1x align_of::<heapless::pool::stack::Node<T>>
1x align_of::<<<I as core::iter::SourceIter>::Source as vec::in_place_collect::AsVecIntoIter>::Item>
3024x size_of::<u32>
2661x size_of::<u64>
2031x size_of::<i32>
1990x size_of::<u16>
1882x size_of::<i64>
1835x size_of::<u128>
1832x size_of::<i16>
1775x size_of::<i128>
1552x size_of::<usize>
1180x size_of::<u8>
1108x size_of::<i8>
1095x size_of::<isize>
935x size_of::<f64>
933x size_of::<f32>
637x size_of::<T>
284x size_of::<libc::unix::linux_like::linux::gnu::cmsghdr>
136x size_of::<A>
128x size_of::<B>
95x size_of::<V>
88x size_of::<bytes::bytes_mut::BytesMut>
86x size_of::<libc::unix::linux_like::linux::cpu_set_t>
72x size_of::<libc::unix::linux_like::sockaddr_storage>
70x size_of::<S>
70x size_of::<libc::unix::linux_like::linux::ucred>
69x size_of::<regex::prog::Inst>
58x size_of::<libc::unix::linux_like::sockaddr_in>
58x size_of::<libc::unix::linux_like::sockaddr_in6>
56x size_of::<<R as rand_core::block::BlockRngCore>::Item>
56x size_of::<libc::unix::linux_like::linux::can_frame>
56x size_of::<libc::unix::linux_like::linux::canfd_frame>
51x size_of::<F>
44x size_of::<stdweb::webcore::serialization::SerializedValue>
44x size_of::<unsafe_libyaml::yaml::yaml_event_t>
35x size_of::<core::core_arch::x86::__m128i>
30x size_of::<*mut Self>
30x size_of::<*mut Inner>
30x size_of::<tokio::util::slab::Slot<T>>
30x size_of::<Self>
28x size_of::<<Elf as read::elf::file::FileHeader>::Word>
28x size_of::<*const Self>
28x size_of::<*const Inner>
28x size_of::<libc::unix::linux_like::linux::sockaddr_vm>
27x size_of::<core::option::Option<alloc::string::String>>
27x size_of::<alloc::string::String>
27x size_of::<<A as Array>::Item>
25x size_of::<unsafe_libyaml::yaml::yaml_token_t>
22x size_of::<syscall::data::TimeSpec>
20x size_of::<char>
20x size_of::<core::core_arch::x86::__m256i>
20x size_of::<bool>
19x size_of::<E>
18x size_of::<libc::unix::linux_like::linux::sockaddr_alg>
18x size_of::<libc::unix::linux_like::linux::sockaddr_nl>
18x size_of::<(usize, usize)>
17x size_of::<regex::dfa::State>
16x size_of::<<Self as read::elf::file::FileHeader>::SectionHeader>
16x size_of::<tokio::runtime::task::core::Core<T, S>>
16x size_of::<libc::unix::linger>
16x size_of::<tokio::runtime::task::core::Header>
14x size_of::<syscall::data::Map>
14x size_of::<libc::unix::linux_like::sockaddr_un>
14x size_of::<syscall::data::Stat>
14x size_of::<syscall::data::StatVfs>
14x size_of::<<Self as contiguous::Contiguous>::Int>
12x size_of::<semver::identifier::Identifier>
12x size_of::<core::mem::maybe_uninit::MaybeUninit<T>>
12x size_of::<crossbeam_epoch::atomic::Array<T>>
12x size_of::<<K as kernel::GemmKernel>::Elem>
12x size_of::<&[usize]>
12x size_of::<syscall::data::OldMap>
10x size_of::<Z>
9x size_of::<alloc::vec::Vec<u8>>
9x size_of::<ring::endian::BigEndian<u64>>
9x size_of::<(u8, S)>
9x size_of::<(usize, u16)>
9x size_of::<regex_automata::util::id::StateID>
9x size_of::<ring::endian::BigEndian<u32>>
9x size_of::<core::option::Option<Z>>
9x size_of::<rustix::backend::process::types::RawCpuSet>
9x size_of::<alloc::vec::Vec<(usize, u16)>>
9x size_of::<alloc::vec::Vec<(usize, usize)>>
9x size_of::<alloc::vec::Vec<u16>>
8x size_of::<<Self as read::elf::file::FileHeader>::ProgramHeader>
8x size_of::<<Self as read::pe::file::ImageNtHeaders>::ImageOptionalHeader>
8x size_of::<unsafe_libyaml::yaml::yaml_node_t>
8x size_of::<&[i32]>
7x size_of::<hashbrown::raw::inner::sse2::Group>
7x size_of::<*mut ()>
7x size_of::<object::endian::U32Bytes<<Self as read::elf::section::SectionHeader>::Endian>>
7x size_of::<hashbrown::raw::sse2::Group>
7x size_of::<H>
7x size_of::<<Elf as read::elf::file::FileHeader>::NoteHeader>
6x size_of::<&[u8]>
6x size_of::<core::sync::atomic::AtomicUsize>
6x size_of::<core::ptr::non_null::NonNull<u8>>
6x size_of::<<types::BitsImpl<SIZE> as types::Bits>::Store>
6x size_of::<alloc::sync::Arc<mio::poll::ReadinessQueueInner>>
6x size_of::<libc::unix::linux_like::sockaddr_ll>
6x size_of::<U>
6x size_of::<<Pe as read::pe::file::ImageNtHeaders>::ImageThunkData>
6x size_of::<slab::Entry<T>>
6x size_of::<object::pe::MaskedRichHeaderEntry>
6x size_of::<regex_automata::util::determinize::state::State>
5x size_of::<(K, usize)>
5x size_of::<object::pe::ImageRelocation>
5x size_of::<libc::unix::linux_like::linux::signalfd_siginfo>
5x size_of::<(K, u8)>
5x size_of::<(K, u32)>
5x size_of::<(K, u16)>
5x size_of::<unsafe_libyaml::yaml::yaml_tag_directive_t>
4x size_of::<syscall::data::ITimerSpec>
4x size_of::<linux_raw_sys::general::linux_dirent64>
4x size_of::<nix::sched::sched_affinity::CpuSet>
4x size_of::<syscall::data::Event>
4x size_of::<syscall::data::Packet>
4x size_of::<syscall::data::PtraceEvent>
4x size_of::<vsdbsled::pagecache::pagetable::Node1>
4x size_of::<inotify_sys::inotify_event>
4x size_of::<&[T]>
4x size_of::<&[f32]>
4x size_of::<&[i128]>
4x size_of::<N>
4x size_of::<<P as pool::singleton::Pool>::Data>
4x size_of::<<K as encoder::TiffKind>::OffsetType>
4x size_of::<(K, V)>
4x size_of::<&[u64]>
4x size_of::<&[u32]>
4x size_of::<&[u16]>
4x size_of::<&[u128]>
4x size_of::<&[i8]>
4x size_of::<&[i64]>
4x size_of::<&[i16]>
4x size_of::<&[isize]>
4x size_of::<&[f64]>
3x size_of::<unsafe_libyaml::yaml::yaml_version_directive_t>
3x size_of::<brotli::ffi::compressor::BrotliEncoderState>
3x size_of::<regex_automata::hybrid::id::LazyStateID>
3x size_of::<ttf_parser::tables::gvar::packed_deltas::PackedDeltasIter>
3x size_of::<ttf_parser::tables::gvar::VariationTuple>
3x size_of::<bumpalo::ChunkFooter>
3x size_of::<brotli_decompressor::ffi::BrotliDecoderState>
3x size_of::<brotli::ffi::multicompress::BrotliEncoderWorkPool>
3x size_of::<unsafe_libyaml::yaml::yaml_document_t>
3x size_of::<Ty>
3x size_of::<core::option::Option<core::num::nonzero::NonZeroU8>>
3x size_of::<lexical_util::error::Error>
2x size_of::<tiff::decoder::ifd::Value>
2x size_of::<regex_automata::nfa::thompson::Transition>
2x size_of::<core::ptr::non_null::NonNull<()>>
2x size_of::<raw_cpuid::VendorInfo>
2x size_of::<redox_termios::Termios>
2x size_of::<redox_termios::Winsize>
2x size_of::<unsafe_libyaml::yaml::yaml_anchors_t>
2x size_of::<K>
2x size_of::<libc::unix::linux_like::linux::inotify_event>
2x size_of::<vsdbsled::node::Node>
2x size_of::<goblin::elf::symver::ElfVersym>
2x size_of::<goblin::mach::load_command::Fvmlib>
2x size_of::<O>
2x size_of::<raw_cpuid::CpuIdResult>
2x size_of::<VI>
2x size_of::<sized_chunks::inline_array::InlineArray<A, T>>
2x size_of::<vsdbsled::pagecache::pagetable::Node2>
2x size_of::<goblin::mach::load_command::Dylib>
2x size_of::<raw_cpuid::SoCVendorBrand>
2x size_of::<portable_atomic::AtomicIsize>
2x size_of::<portable_atomic::AtomicPtr<()>>
2x size_of::<cranelift_codegen::ir::entities::Value>
2x size_of::<unsafe_libyaml::yaml::yaml_parser_t>
2x size_of::<erased_serde::any::Value>
2x size_of::<unsafe_libyaml::yaml::yaml_node_pair_t>
2x size_of::<portable_atomic::AtomicBool>
2x size_of::<portable_atomic::AtomicI128>
2x size_of::<portable_atomic::AtomicI16>
2x size_of::<portable_atomic::AtomicI32>
2x size_of::<portable_atomic::AtomicI64>
2x size_of::<portable_atomic::AtomicI8>
2x size_of::<unsafe_libyaml::yaml::yaml_emitter_t>
2x size_of::<Item>
2x size_of::<portable_atomic::AtomicUsize>
2x size_of::<I>
2x size_of::<primitive_types::H256>
2x size_of::<portable_atomic::AtomicU128>
2x size_of::<portable_atomic::AtomicU16>
2x size_of::<portable_atomic::AtomicU32>
2x size_of::<portable_atomic::AtomicU64>
2x size_of::<portable_atomic::AtomicU8>
2x size_of::<primitive_types::H160>
1x size_of::<valuable::field::NamedField>
1x size_of::<unsafe_libyaml::yaml::yaml_simple_key_t>
1x size_of::<unsafe_libyaml::yaml::yaml_parser_state_t>
1x size_of::<twox_hash::xxh3::Acc>
1x size_of::<unsafe_libyaml::yaml::yaml_alias_data_t>
1x size_of::<unsafe_libyaml::yaml::yaml_mark_t>
1x size_of::<twox_hash::xxh3::Secret>
1x size_of::<<<I as core::iter::SourceIter>::Source as vec::in_place_collect::AsVecIntoIter>::Item>
1x size_of::<&std::io::error::SimpleMessage>
1x size_of::<unsafe_libyaml::yaml::yaml_emitter_state_t>
1x size_of::<regex_automata::util::id::PatternID>
1x size_of::<alloc::boxed::Box<std::io::error::Custom>>
1x size_of::<core::option::Option<core::num::nonzero::NonZeroUsize>>
1x size_of::<core::num::nonzero::NonZeroU16>
1x size_of::<core::num::nonzero::NonZeroU32>
1x size_of::<core::num::nonzero::NonZeroU64>
1x size_of::<core::num::nonzero::NonZeroU8>
1x size_of::<core::option::Option<$fn>>
1x size_of::<core::option::Option<core::num::nonzero::NonZeroI32>>
1x size_of::<core::option::Option<std::io::error::repr_bitpacked::Repr>>
1x size_of::<primitive_types::H512>
1x size_of::<core::result::Result<(), std::io::error::repr_bitpacked::Repr>>
1x size_of::<core::result::Result<usize, std::io::error::repr_bitpacked::Repr>>
1x size_of::<deunicode::Ptr>
1x size_of::<libc::unix::linux_like::linux::gnu::b64::sigset_t>
1x size_of::<goblin::elf::symver::Versym>
1x size_of::<half::binary16::f16>
1x size_of::<primitive_types::H128>
1x size_of::<pyo3::pycell::PyCell<T>>
1x size_of::<std::sys::unix::process::process_common::Command::do_fork::clone_args>
1x size_of::<core::num::nonzero::NonZeroI16>
1x size_of::<std::io::error::repr_bitpacked::Repr>
1x size_of::<std::io::error::Custom>
1x size_of::<secp256k1_sys::types::AlignedType>
1x size_of::<rio::io_uring::kernel_types::io_uring_sqe>
1x size_of::<rio::io_uring::kernel_types::io_uring_cqe>
1x size_of::<core::num::nonzero::NonZeroI128>
1x size_of::<core::num::nonzero::NonZeroI32>
1x size_of::<pyo3_ffi::methodobject::PyMethodDefPointer>
1x size_of::<heapless::pool::stack::Node<T>>
1x size_of::<core::num::nonzero::NonZeroI64>
1x size_of::<regex_automata::nfa::thompson::compiler::CState>
1x size_of::<regex_automata::nfa::thompson::State>
1x size_of::<core::num::nonzero::NonZeroI8>
1x size_of::<core::num::nonzero::NonZeroU128>
1x size_of::<winit::icon::Pixel>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment