onnxruntime
6cd1931a - Specify list/map capacity when initializing where possible (#11110)

Commit
3 years ago
Specify list/map capacity when initializing where possible (#11110) * Specify list/map capacity when initializing where possible - This really depends on the use case, but in some cases the array/map resizing can be slightly costly, there is effectively no downside setting the initial capacity for a collection if we know for sure its final size * Supply list/map capacity when initializing where possible - This really depends on the use case, but in some cases the array/map resizing can be slightly costly, there is effectively no downside setting the initial capacity for a collection if we know for sure its final size - Introduce an extra utility to help creating maps with expected capacity * Move utility function to OrtUtil and drop MapUtil, also add Java doc to method * Move test to the right class
Author
Parents
Loading