Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
6deffb9
feat(util): add ConcurrentHashtable with lock-free D1/D2 composite-ke…
dougqh Jun 18, 2026
2b6570d
refactor(util): move shared ConcurrentHashtable mechanics into Suppor…
dougqh Jun 18, 2026
f415b3b
test(util): add chain collision and concurrent distinct-key tests for…
dougqh Jun 18, 2026
68f85d6
Add Support.bucket() helpers to hide unchecked casts in ConcurrentHas…
dougqh Jun 23, 2026
b350fb4
Replace ConcurrentHashtableD2Benchmark with ThreadSafeMap{D1,D2} and …
dougqh Jun 23, 2026
c925f20
Rename ThreadSafeCounterBenchmark to ThreadSafeMapCounterBenchmark
dougqh Jun 23, 2026
383fed7
Add Support-based primitive-int K2 benchmark case to ThreadSafeMapD2B…
dougqh Jun 23, 2026
4c71ba0
Document synchronization contract on ConcurrentHashtable.Support
dougqh Jun 23, 2026
627bf8f
Note lock-striping advantage of using ConcurrentHashtable.Support dir…
dougqh Jun 23, 2026
61395a0
Add getOrCreate_support and getOrCreate_concurrentSkipListMap to Thre…
dougqh Jun 23, 2026
9591965
Add Java 17 benchmark results to ThreadSafeMap Javadocs
dougqh Jun 23, 2026
71385ac
Remove superseded ThreadSafeMapBenchmark
dougqh Jun 23, 2026
bc0ecfd
Add remove/removeIf/drain/clear to ConcurrentHashtable
dougqh Jun 23, 2026
42c0616
Note interned-key lookups in ThreadSafeMap benchmarks
dougqh Jun 23, 2026
177a0c5
Merge remote-tracking branch 'origin/master' into feat/concurrent-has…
dougqh Jun 23, 2026
9bef132
Merge remote-tracking branch 'origin/master' into feat/concurrent-has…
dougqh Jul 29, 2026
69df37b
Reshape ConcurrentHashtable to match Hashtable + FlatHashtable family…
dougqh Jul 29, 2026
5829238
Update ConcurrentHashtable tests + benchmarks to createFixedBuckets API
dougqh Jul 29, 2026
a76b741
Move write locking into ConcurrentHashtable static helpers
dougqh Jul 29, 2026
40bcc02
Devirtualize matches() equals + drop varargs hash from benchmark key
dougqh Jul 29, 2026
5eca37f
Add coverage for ConcurrentHashtable static building blocks
dougqh Jul 29, 2026
e1b33c6
Document drain's throwing-sink contract
dougqh Jul 29, 2026
2decaa4
Shorten matches() devirtualization comments
dougqh Jul 29, 2026
ae9d10f
Rename chain-walk loop variable te -> curEntry
dougqh Jul 29, 2026
5ecc585
Merge branch 'master' into feat/concurrent-hashtable
dougqh Jul 29, 2026
d12e93d
ConcurrentHashtable: annotate nullability (@Nonnull/@Nullable)
dougqh Jul 29, 2026
4a20ba8
Annotate ConcurrentHashtable.D1/D2 @ThreadSafe and unlocked mutators …
dougqh Jul 29, 2026
8955442
Rename bucket/insertHeadEntry overloads to fix silent int/long ambiguity
dougqh Aug 20, 2026
f939ccf
Merge remote-tracking branch 'origin/master' into feat/concurrent-has…
dougqh Aug 26, 2026
a341e8c
Merge branch 'master' into feat/concurrent-hashtable
dougqh Aug 28, 2026
2a18658
Assert against double-inserting the same Entry instance
dougqh Aug 28, 2026
761d3f8
Merge remote-tracking branch 'origin/master' into feat/concurrent-has…
dougqh Aug 28, 2026
09a725f
Port Hashtable's SizeManager eviction to ConcurrentHashtable
dougqh Aug 28, 2026
1e58686
Add ConcurrentHashtable.insertReserved static helper
dougqh Aug 28, 2026
2926efb
fix: make eviction cursor visible across threads
bric3 Aug 31, 2026
81b84bf
revert: restore lock-guarded eviction cursor
bric3 Aug 31, 2026
c5abed7
Keep the reservation and its insert in one critical section
dougqh Aug 31, 2026
c8b331c
Name the lock by the scope it covers, not "the table's lock"
dougqh Aug 31, 2026
0f82303
Make the count honest instead of locking around it
dougqh Aug 31, 2026
d294d3a
Merge branch 'master' into feat/concurrent-hashtable
bric3 Aug 31, 2026
e46a3c5
Trim ConcurrentHashtable javadoc and clarify the isFull-before-create…
dougqh Sep 1, 2026
b37e21c
Merge branch 'master' into feat/concurrent-hashtable
dougqh Sep 1, 2026
09134b4
Decouple ConcurrentHashtable.sizeFor from Hashtable.Support
dougqh Sep 1, 2026
1367128
perf: reduce LogCollector dedup allocations
bric3 Sep 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Scope;
import org.openjdk.jmh.annotations.Setup;
import org.openjdk.jmh.annotations.State;
import org.openjdk.jmh.annotations.Threads;
import org.openjdk.jmh.annotations.Warmup;

Expand All @@ -11,34 +15,44 @@
@Measurement(iterations = 5)
@Threads(8)
public class LogCollectorBenchmark {
@State(Scope.Benchmark)
public static class CollectorState {
final LogCollector collector = new LogCollector(4);

@Setup(Level.Trial)
public void setup() {
collector.addLogMessage("error", "ugh!", null);
}
}

@Benchmark
public void noException_before() {
LogCollector.get().addLogMessage("error", "ugh!", null);
public void duplicateWithoutException(CollectorState state) {
state.collector.addLogMessage("error", "ugh!", null);
}

static final Object NULL = null;

@Benchmark
public void nullPointerException() {
public void nullPointerException(CollectorState state) {
// Represents the fast throw case where the JVM switches to using
// a single Exception instance to handle a hot throw location
// of NullPointerException, ArrayIndexOutOfBoundsException, etc.
// In this case, the stacktrace of the exception will not be available.
try {
NULL.hashCode();
} catch (Throwable t) {
LogCollector.get().addLogMessage("error", "npe", t);
state.collector.addLogMessage("error", "npe", t);
}
}

@Benchmark
public void unsupportedOperationException() {
public void unsupportedOperationException(CollectorState state) {
// Represents the common case where stack trace is preserved
// despite hot throw
try {
unsupportedOperation();
} catch (Throwable t) {
LogCollector.get().addLogMessage("error", "unsupported", t);
state.collector.addLogMessage("error", "unsupported", t);
}
}

Expand Down

This file was deleted.

Loading
Loading