high-performance-java

high-performance-java is a skill for Codex from eclipse-rdf4j/rdf4j. It costs 140 tokens per session (2,392 once invoked), scanned A, original, BSD-3-Clause.

A guide for improving the speed and memory use of Java code running on the HotSpot virtual machine. It focuses on algorithms, data structures, runtime behavior, and measured performance.

In plain words
What is it for?
Use it when writing or reviewing performance-sensitive Java code, reducing allocations, improving throughput or latency, or evaluating runtime code generation.
Why use it?
It helps locate slow code and choose changes based on workload measurements rather than assumptions.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/eclipse-rdf4j/rdf4j/high-performance-java
Any agent
npx skills add eclipse-rdf4j/rdf4j --skill high-performance-java
Clone the repo
git clone --depth 1 https://github.com/eclipse-rdf4j/rdf4j

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for high-performance-java

README.md
[![agentmods](https://agentmods.dev/badge/skills/eclipse-rdf4j/rdf4j/high-performance-java.svg)](https://agentmods.dev/skills/eclipse-rdf4j/rdf4j/high-performance-java)
Your own site
<a href="https://agentmods.dev/skills/eclipse-rdf4j/rdf4j/high-performance-java"><img src="https://agentmods.dev/badge/skills/eclipse-rdf4j/rdf4j/high-performance-java.svg" alt="Measured on agentmods" height="20"></a>
Per session 140 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,392 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00140 $0.02392
Opus 5 $0.00070 $0.01196
Sonnet 5 $0.00028 $0.00478
Haiku 4.5 $0.00014 $0.00239

Measured 2d ago against content hash 56bdf6776673, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

high-performance-java scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.agent/skills/high-performance-java/SKILL.md · 195 lines

How it starts

The opening of the file, as written. The whole thing — 195 lines — stays where its author put it; the contents beside it link to each section on GitHub.

High-Performance Java

Use this skill for Java hot paths, algorithm-heavy Java, and JVM-side runtime specialization. Default bias: asymptotic win first, then the right execution model, then fewer allocations, fewer copies, less polymorphism, narrower code shape, stronger evidence.

HotSpot-only v1. Baseline assumptions:

  • repo baseline: JDK 21
  • current local runtime may be newer
  • low-level claims stay provisional until benchmark + JIT evidence agree
  • algorithm/data-structure claims stay provisional until they match the actual workload constraints
  • runtime codegen claims stay provisional until cold-start cost, warm steady-state behavior, and fallback behavior are all understood

Core loop

  1. Identify the workload shape and constraints.
  2. Pick the algorithm and data structure that change the slope.
  3. Decide whether the workload should stay interpreted, become vectorized/batched, or justify runtime specialization/code generation.
  4. Find the hot loop, hot call chain, or hot operator pipeline.
  5. Write the narrow fast path first.
  6. Push generic abstraction, materialization, and dispatch out of the loop.
  7. Benchmark before claiming improvement.
  8. Inspect HotSpot decisions before claiming JVM-level reasons.

Default coding bias

  • Prefer an algorithmic win over a micro win.
  • Prefer data structures that fit the operation mix, memory budget, and key domain.
  • Prefer the right execution model over reflexively adding code generation.
  • Prefer primitive-friendly layouts before boxed object graphs.
  • Prefer zero-copy over copy-transform-copy.
  • Prefer reuse over per-item allocation.
  • Prefer lazy traversal over full materialization.
  • Prefer primitives, flat arrays, and tight counted loops in hot paths.
  • Prefer monomorphic calls that inline away.
  • Prefer specialized lambda/adaptor code for the active workload.
  • Prefer one fast path plus one cold fallback over a single generalized hot path.
  • Prefer Janino only when generated Java can stay simple, code size can stay bounded, and compile cost can be amortized.

Read the full file on GitHub · 195 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 195 lines · 140 tokens per session scan A 56bdf6776673

Subscribe to this mod's changes

high-performance-java is a skill published in the GitHub repository eclipse-rdf4j/rdf4j (412 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 140 tokens to every session and 2,392 once invoked, about $0.0007 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

open-ontologies

AI-native ontology engineering using 50+ MCP tools backed by an in-memory Oxigraph triple store. Build, validate, query, and govern RDF/OWL ontologies with a generate-validate-iterate loop. Use when building ontologies, knowledge graphs, RDF data, SPARQL queries, BORO/4D modeling, SHACL validation, clinical…

fabio-rovai/open-ontologies · 110 tokens

mcp-sparql

Exposes SPARQL query capabilities to LLMs via the Model Context Protocol. Supports SELECT, ASK, CONSTRUCT, and DESCRIBE queries against any SPARQL endpoint.

daedalus/mcp-sparql · 0 tokens

knowledge-graph-sparql

Knowledge graph construction, SPARQL querying, and entity linking for library and research data management using RDF and Wikidata.

xjtulyc/awesome-rosetta-skills · 31 tokens

azure-communication-common-java

Azure Communication Services common utilities for Java. Use when working with CommunicationTokenCredential, user identifiers, token refresh, or shared authentication across ACS services.

microsoft/skills · 35 tokens

azure-security-keyvault-secrets-java

Azure Key Vault Secrets Java SDK for secret management. Use when storing, retrieving, or managing passwords, API keys, connection strings, or other sensitive configuration data.

microsoft/skills · 40 tokens

azure-ai-anomalydetector-java

Build anomaly detection applications with Azure AI Anomaly Detector SDK for Java. Use when implementing univariate/multivariate anomaly detection, time-series analysis, or AI-powered monitoring.

microsoft/skills · 43 tokens