Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Use when you need to refactor Java code for high performance — including memory/allocation reduction, CPU hot-path optimization, and syntax/API/control-flow improvements. This should trigger for requests such as Review Java code for high performance; Optimize Java hot path; Reduce Java allocations; Improve Java latency/throughput. Part of Plinth Toolkit
.claude/skills/jabrena-145-java-refactoring-high-performance/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 7% | 0% |
| case-01 | ✓→✗ | ▼ Worse | 11% | 0% |
| case-02 | ✓→✗ | ▼ Worse | -16% | 0% |
| case-05 | ✓→✗ | ▼ Worse | 16% | 0% |
| case-06 | ✓→✗ | ▼ Worse | -9% | 0% |
Identify and apply practical Java high-performance techniques using a measure-first approach, with emphasis on allocation reduction, data layout, concurrency discipline, and evidence-based validation.
What is covered in this Skill?
Scope: Practical optimization in application code and APIs. Apply only where profiling indicates real bottlenecks.
Performance optimization must be evidence-driven and safe, focused on Java code changes that preserve correctness and maintainability.
Confirm the performance-sensitive Java path and baseline behavior before changing code.
Pick and read only the reference(s) matching the observed hotspot: references/145-refactoring-high-performance-java-memory-allocation.md for allocation pressure, primitives vs. wrappers, escape analysis, collection sizing, data layout, and deduplication; references/145-refactoring-high-performance-java-cpu.md for CPU-bound hot paths, bit-level parsing, branchless arithmetic, loop unrolling, Unsafe caution, and SIMD/vectorization; references/145-refactoring-high-performance-java-code-syntax.md for code shape, lambdas, API return conventions, parsing syntax, I/O strategy, concurrency, and control-flow improvements.
Implement minimal, evidence-backed changes scoped to the chosen domain(s): memory/allocation, CPU/low-level, or code shape/control flow (and adjacent concurrency, I/O, and persistence/caching in Java code).
Compare before/after behavior and keep only Java code changes with meaningful, verified gains.
For detailed guidance, examples, and constraints, see:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→fail | 24,585 | 21,218 | -14% | 1 | 1 | 0% | 3,916 | 4,354 | +11% | 0 | 0 | — |
case-02 | pass→fail | 25,899 | 19,510 | -25% | 1 | 1 | 0% | 4,793 | 4,019 | -16% | 0 | 0 | — |
case-03 | fail→fail | 22,763 | 14,520 | -36% | 1 | 1 | 0% | 3,873 | 3,085 | -20% | 0 | 0 | — |
case-04 | pass→pass | 16,910 | 14,116 | -17% | 1 | 1 | 0% | 2,822 | 3,103 | +10% | 0 | 0 | — |
case-05 | pass→fail | 16,371 | 14,908 | -9% | 1 | 1 | 0% | 2,563 | 2,968 | +16% | 0 | 0 | — |
case-06 | pass→fail | 16,148 | 13,005 | -19% | 1 | 1 | 0% | 2,701 | 2,459 | -9% | 0 | 0 | — |
case-07 | fail→pass | 19,047 | 27,682 | +45% | 1 | 1 | 0% | 2,947 | 3,158 | +7% | 0 | 0 | — |
case-08 | pass→pass | 11,732 | 8,491 | -28% | 1 | 1 | 0% | 2,241 | 2,025 | -10% | 0 | 0 | — |
case-09 | pass→pass | 8,873 | 6,769 | -24% | 1 | 1 | 0% | 1,735 | 2,040 | +18% | 0 | 0 | — |
case-10 | pass→pass | 13,665 | 8,927 | -35% | 1 | 1 | 0% | 2,352 | 2,580 | +10% | 0 | 0 | — |
case-11 | pass→fail | 15,517 | 10,765 | -31% | 1 | 1 | 0% | 2,643 | 3,121 | +18% | 0 | 0 | — |
case-12 | pass→pass | 13,336 | 10,746 | -19% | 1 | 1 | 0% | 2,476 | 2,892 | +17% | 0 | 0 | — |
case-13 | pass→pass | 8,122 | 8,443 | +4% | 1 | 1 | 0% | 1,292 | 2,215 | +71% | 0 | 0 | — |
case-14 | pass→pass | 15,492 | 19,241 | +24% | 1 | 1 | 0% | 2,658 | 2,321 | -13% | 0 | 0 | — |
case-15 | pass→pass | 9,194 | 4,439 | -52% | 1 | 1 | 0% | 1,448 | 1,383 | -4% | 0 | 0 | — |
case-16 | pass→pass | 13,591 | 7,291 | -46% | 1 | 1 | 0% | 2,320 | 1,951 | -16% | 0 | 0 | — |
case-17 | pass→pass | 12,039 | 9,278 | -23% | 1 | 1 | 0% | 2,116 | 2,266 | +7% | 0 | 0 | — |
case-18 | pass→pass | 16,282 | 11,112 | -32% | 1 | 1 | 0% | 2,508 | 2,431 | -3% | 0 | 0 | — |
case-19 | pass→pass | 15,155 | 9,674 | -36% | 1 | 1 | 0% | 2,519 | 2,320 | -8% | 0 | 0 | — |
case-20 | pass→pass | 11,907 | 11,831 | -1% | 1 | 1 | 0% | 1,951 | 2,871 | +47% | 0 | 0 | — |
case-21 | pass→pass | 9,769 | 6,390 | -35% | 1 | 1 | 0% | 1,704 | 1,901 | +12% | 0 | 0 | — |
case-22 | pass→pass | 18,133 | 11,843 | -35% | 1 | 1 | 0% | 2,807 | 2,494 | -11% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of -67 percentage points is the difference between those two pass rates over the 22 comparable cases. 5 cases got worse with the skill loaded, and they are included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.