[ https://issues.apache.org/jira/browse/IGNITE-16451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17497522#comment-17497522 ]
Ivan Bessonov commented on IGNITE-16451: ---------------------------------------- [~ktkale...@gridgain.com] I added a commit to your branch with better handling of corned cases. It doesn't affect performance on small arrays, but works really well on big ones, smoothing the results. Before: {code:java} Benchmark (arraySize) Mode Cnt Score Error Units ArrayRemoveBenchmark.removeLongFromEnd 20000 avgt 3 20321.516 ± 367.637 ns/op ArrayRemoveBenchmark.removeLongFromMid 20000 avgt 3 22765.142 ± 4502.583 ns/op ArrayRemoveBenchmark.removeLongFromStart 20000 avgt 3 25759.976 ± 1368.394 ns/op ArrayRemoveBenchmark.removeObjFromEnd 20000 avgt 3 7622.887 ± 79.447 ns/op ArrayRemoveBenchmark.removeObjFromMid 20000 avgt 3 8657.881 ± 456.166 ns/op ArrayRemoveBenchmark.removeObjFromStart 20000 avgt 3 10332.110 ± 890.269 ns/op {code} After: {code:java} Benchmark (arraySize) Mode Cnt Score Error Units ArrayRemoveBenchmark.removeLongFromEnd 20000 avgt 3 20270.514 ± 1009.680 ns/op ArrayRemoveBenchmark.removeLongFromMid 20000 avgt 3 22495.558 ± 217.688 ns/op ArrayRemoveBenchmark.removeLongFromStart 20000 avgt 3 20289.918 ± 1263.525 ns/op ArrayRemoveBenchmark.removeObjFromEnd 20000 avgt 3 7602.918 ± 1907.953 ns/op ArrayRemoveBenchmark.removeObjFromMid 20000 avgt 3 8588.466 ± 1971.374 ns/op ArrayRemoveBenchmark.removeObjFromStart 20000 avgt 3 7819.227 ± 388.604 ns/op {code} > Try to optimize ArrayUtils#remove > --------------------------------- > > Key: IGNITE-16451 > URL: https://issues.apache.org/jira/browse/IGNITE-16451 > Project: Ignite > Issue Type: Improvement > Reporter: Kirill Tkalenko > Assignee: Kirill Tkalenko > Priority: Minor > Labels: ignite-3, tech-debt > Fix For: 3.0.0-alpha5 > > Time Spent: 10m > Remaining Estimate: 0h > > We can try to optimize and benchmark *ArrayUtils#remove(T[], int)* and > *ArrayUtils#remove(long[], int)*, for example using *Arrays#copyOf* and > *System#arraycopy*. -- This message was sent by Atlassian Jira (v8.20.1#820001)