-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Labels
optimizePotential optimization opportunityPotential optimization opportunitytrackerIssue tracked by botIssue tracked by bot
Description
On 2023-08-13 @prestwich wrote in 55c5411 “Merge pull request #293 from recmo/remco/base-to”:
Internalize this trick so the user won't have to worry about it.
Panics
Panics if the base is less than 2.
/// little-endian order.
///
/// Pro tip: instead of setting `base = 10`, set it to the highest
/// power of `10` that still fits `u64`. This way much fewer iterations
/// are required to extract all the digits.
// OPT: Internalize this trick so the user won't have to worry about it.
/// # Panics
///
/// Panics if the base is less than 2.
#[inline]
pub fn to_base_le(&self, base: u64) -> impl Iterator<Item = u64> {
assert!(base > 1);
SpigotLittle {
base,Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
optimizePotential optimization opportunityPotential optimization opportunitytrackerIssue tracked by botIssue tracked by bot