Skip to content

Instantly share code, notes, and snippets.

View adamretter's full-sized avatar
🎩
Down the Code Mine

Adam Retter adamretter

🎩
Down the Code Mine
View GitHub Profile

Quick Tips for Fast Code on the JVM

I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.

This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea

@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@olagache
olagache / .jdk1.8.jinfo
Last active October 21, 2021 14:12
Generate ".jdk1.8.jinfo" and "alternatives.sh" files to install java 8 using ubuntu alternatives.
alias=jdk1.8
section=non-free
jre servertool /usr/lib/jvm/jdk1.8/jre/bin/servertool
jre keytool /usr/lib/jvm/jdk1.8/jre/bin/keytool
jre java /usr/lib/jvm/jdk1.8/jre/bin/java
jre jcontrol /usr/lib/jvm/jdk1.8/jre/bin/jcontrol
jre rmid /usr/lib/jvm/jdk1.8/jre/bin/rmid
jre ControlPanel /usr/lib/jvm/jdk1.8/jre/bin/ControlPanel
jre rmiregistry /usr/lib/jvm/jdk1.8/jre/bin/rmiregistry
jre orbd /usr/lib/jvm/jdk1.8/jre/bin/orbd
@adamretter
adamretter / RuleParser.scala
Created April 28, 2012 13:13
Scala Parser, trying to parse regexp
package csvvalidator
import scala.util.parsing.combinator.syntactical.StandardTokenParsers
import scala.io.Source;
/**
* Adam Retter
*/
object TestProblemParser extends StandardTokenParsers {