You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Wilfred Spiegelenburg (Jira)" <ji...@apache.org> on 2026/10/08 02:03:00 UTC
[jira] [Created] (YUNIKORN-3503) Improve pre-allocate for slices
Wilfred Spiegelenburg created YUNIKORN-3503:
-----------------------------------------------
Summary: Improve pre-allocate for slices
Key: YUNIKORN-3503
URL: https://issues.apache.org/jira/browse/YUNIKORN-3503
Project: Apache YuniKorn
Issue Type: Improvement
Components: core - common, shim - kubernetes
Reporter: Wilfred Spiegelenburg
Assignee: Shree Govind Mishra
change slice pre-allocation from 2 to 3 parameters to improve performance:
Lots of slices use a call like `make([]type, 0)` and then iterate over a map or other slice to copy a known max number of objects and add them using `append()` we should use the 3 parameter option to limit the re-allocations: make([]type, 0, len(rangeObj))`
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org