Skip to content

GH-3900: misc mem improvements#3901

Open
arne-bdt wants to merge 2 commits intoapache:mainfrom
arne-bdt:GH-3900-misc-mem-improvements
Open

GH-3900: misc mem improvements#3901
arne-bdt wants to merge 2 commits intoapache:mainfrom
arne-bdt:GH-3900-misc-mem-improvements

Conversation

@arne-bdt
Copy link
Copy Markdown
Contributor

@arne-bdt arne-bdt commented May 6, 2026

GitHub issue resolved #3900

Pull request Description:

Minor bugs fixed:

  • FastArrayBunch does not hold references to orphans after #tryRemove and #removeUnchecked
  • FastHashMap#computeIfAbsent does not creat an invalid state if call of absentValueSupplier fails
  • FastHashMap#compute now grows on insert like all other insert operations of this map

Improvements:

  • iterators and spliterators don't need a runnable for concurrency check any more. They check the size directly, which has been shown to be faster.
  • FastHashBase#fillPositionsArray now iterates over the dense keys array, which should be faster in most cases.
  • Removed FastHashSet#IndexedKey and the corresponding iterator and spliterator implementations --> introduced FastHashBase#forEachKey and #forEachKeyParallel instead
  • added JavaDoc
  • added tests

  • Tests are included.
  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

Minor bugs fixed:
- FastArrayBunch does not hold references to orphans after #tryRemove and #removeUnchecked
- FastHashMap#computeIfAbsent does not creat an invalid state if call of absentValueSupplier fails
- FastHashMap#compute now grows on insert like all other insert operations of this map

Improvements:
- iterators and spliterators don't need a runnable for concurrency check any more. They check the size directly, which has been shown to be faster.
- FastHashBase#fillPositionsArray now iterates over the dense keys array, which should be faster in most cases.
- Removed FastHashSet#IndexedKey and the corresponding iterator and spliterator implementations
--> introduced FastHashBase#forEachKey and #forEachKeyParallel instead
- added JavaDoc
- added tests
Fixing jena-benckmarks:
- updated pom.xml files to version "6.2.0-SNAPSHOT"
- fixed spliterator benchmarks to support new Sized parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

misc mem improvements

2 participants