onnxruntime/java/src
Mina Asham 6cd1931a93
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
2022-04-27 20:59:18 -07:00
..
main Specify list/map capacity when initializing where possible (#11110) 2022-04-27 20:59:18 -07:00
test Specify list/map capacity when initializing where possible (#11110) 2022-04-27 20:59:18 -07:00