diff options
author | Bjarne Koll <[email protected]> | 2021-03-03 03:52:43 +0100 |
---|---|---|
committer | Bjarne Koll <[email protected]> | 2021-03-03 03:52:43 +0100 |
commit | 64e1a54657339596d0ce67b029a90df671f78aa5 (patch) | |
tree | 6044848539fa174fc5c5d7c5f33f5456f25746fa /LICENSE.md | |
parent | de5a2a4108688e5c5c67701258669b8c6dad8392 (diff) | |
download | Paper-64e1a54657339596d0ce67b029a90df671f78aa5.tar.gz Paper-64e1a54657339596d0ce67b029a90df671f78aa5.zip |
Remove streams from SensorNearest
The behavioural nearby sensors are validated every tick on the entities
that registered the respective sensors and are therefore a good subject
to performance improvements.
More specifically this commit replaces the Stream#filter usage with
ArrayList#removeIf as the removeIf method on an array list is heavily
optimized towards a single internal array re-allocation without any
further overhead on the removeIf call.
The only negative of this change is the rather agressive diff these
patches introduce as the methods are basically being reimplemented
compared to the previous stream-based implementation.
See: https://nipafx.dev/java-stream-performance/
Note: Updated LICENCE.md to release this commit under MIT
Diffstat (limited to 'LICENSE.md')
-rw-r--r-- | LICENSE.md | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/LICENSE.md b/LICENSE.md index 5f11d30eca..ba0f41a622 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -47,4 +47,5 @@ Nassim Jahnke <[email protected]> Machine_Maker <[email protected]> Ivan Pekov <[email protected]> Camotoy <[email protected]> +Bjarne Koll <[email protected]> ``` |