Turbo Charge CPU Utilization in Fork/Join Using the ManagedBlocker
summary
Shows that a faster algorithm (fast doubling for Fibonacci) turns an intractable computation into milliseconds, then that naive Fork/Join parallelism stalls (single-threaded tail work -> ~22s). Replacing BigInteger internals and parallelizing multiplication yields ~18.5s, adding a ConcurrentHashMap cache with putIfAbsent placeholder cuts to ~9.4s, and a reserved caching scheme plus a ManagedBlocker that lets ForkJoinPool spawn extra workers drops it to ~6.9s. Also demonstrates bootclasspath patching to use a hacked BigInteger.
AI-written summary · about
chapters (10)
- 0:00Start
- 1:32Speeding Up Fibonacci
- 2:25Naive Implementation
- 4:163º Attempt Dijkstra's Sum of Squares
- 11:00Parallelize Our Algorithm
- 22:03Parallelize BigInteger
- 34:40Cache Results
- 45:29ManagedBlocker
- 50:45CompletableFuture (Homework)
- 51:23Refactoring to Java 8 Streams Workshop
related talks
53mTurbo Charge CPU Utilization in Fork/Join Using the ManagedBlocker
46mMake Your CPU Cores Sweat with Parallel Streams
01h 01mFrom Concurrent to Parallel
04mInterview
50mFrom Concurrent to Parallel
39mThe best multicore-parallelization refactoring you've never heard of
47mConquering a Billion Rows with Modern Java Concurrency
45mHow difficult can it be to write efficient code?
