@@ -14,6 +14,7 @@ use std::ops::{Shl, Shr};
14
14
15
15
use itertools:: Itertools ;
16
16
use num_traits:: { Float , One , PrimInt } ;
17
+ use rustc_hash:: FxBuildHasher ;
17
18
use vortex_array:: aliases:: hash_map:: HashMap ;
18
19
use vortex_array:: arrays:: PrimitiveArray ;
19
20
use vortex_array:: { Array , IntoArray , ToCanonical } ;
@@ -350,7 +351,7 @@ fn build_left_parts_dictionary<T: ALPRDFloat>(
350
351
sorted_bit_counts. sort_by_key ( |( _, count) | count. wrapping_neg ( ) ) ;
351
352
352
353
// Assign the most-frequently occurring left-bits as dictionary codes, up to `dict_size`...
353
- let mut dictionary = HashMap :: with_capacity ( max_dict_size as _ ) ;
354
+ let mut dictionary = HashMap :: with_capacity_and_hasher ( max_dict_size as _ , FxBuildHasher ) ;
354
355
let mut code = 0u16 ;
355
356
while code < ( max_dict_size as _ ) && ( code as usize ) < sorted_bit_counts. len ( ) {
356
357
let ( bits, _) = sorted_bit_counts[ code as usize ] ;
@@ -397,7 +398,7 @@ fn estimate_compression_size(
397
398
#[ derive( Debug , Default ) ]
398
399
struct ALPRDDictionary {
399
400
/// Items in the dictionary are bit patterns, along with their 16-bit encoding.
400
- dictionary : HashMap < u16 , u16 > ,
401
+ dictionary : HashMap < u16 , u16 , FxBuildHasher > ,
401
402
/// The (compressed) left bit width. This is after bit-packing the dictionary codes.
402
403
left_bit_width : u8 ,
403
404
/// The right bit width. This is the bit-packed width of each of the "real double" values.
0 commit comments