SlideShare a Scribd company logo
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Priming Java

for Speed at Market Open

!
Getting Fast & Staying Fast

Gil Tene, CTO & co-Founder, Azul Systems
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
High level agenda
Intro

Java realities at Market Open

A whole bunch of compiler optimization stuff

Deoptimization…

What we can do about it
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
About me: Gil Tene
co-founder, CTO @Azul
Systems

Have been working on “think
different” GC approaches
since 2002

At Azul we make JVMs that
dramatically improve latency
behavior

As a result, we end up
working a lot with low latency
trading systems

And (after GC is solved) the
Market Open problem seems
to dominate concerns * working on real-world trash compaction issues, circa 2004
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Are you fast at Market Open?
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Java at Market Open
. . .
Market Open
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Java’s “Just In Time” Reality
Starts slow, learns fast

Lazy loading & initialization

Aggressively optimized for
the common case

(temporarily) Reverts to
slower execution to adapt
Warmup
Deoptimization
. . .
Compiler Stuff
Some simple compiler tricks
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Code can be reordered...
int doMath(int x, int y, int z) {

int a = x + y;

int b = x - y;

int c = z + x;

return a + b;

}

Can be reordered to:

int doMath(int x, int y, int z) {

int c = z + x;

int b = x - y;

int a = x + y;

return a + b;

}
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Dead code can be removed
int doMath(int x, int y, int z) {

int a = x + y;

int b = x - y;

int c = z + x;

return a + b;

}

!
Can be reduced to:

!
int doMath(int x, int y, int z) {

int a = x + y;

int b = x - y;

return a + b;

}
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Values can be propagated
int doMath(int x, int y, int z) {

int a = x + y;

int b = x - y;

int c = z + x;

return a + b;

}

!
Can be reduced to:

!
int doMath(int x, int y, int z) {

return x + y + x - y;

}

!
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Math can be simplified
int doMath(int x, int y, int z) {

int a = x + y;

int b = x - y;

int c = z + x;

return a + b;

}

!
Can be reduced to:

!
int doMath(int x, int y, int z) {

return x + x;

}

!
Some more compiler tricks
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Reads can be cached
int distanceRatio(Object a) {

int distanceTo = a.getX() - start;

int distanceAfter = end - a.getX();

return distanceTo/distanceAfter;

}

Is the same as

int distanceRatio(Object a) {

int x = a.getX(); 

int distanceTo = x - start; 

int distanceAfter = end - x;

return distanceTo/distanceAfter;

}
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Reads can be cached
void loopUntilFlagSet(Object a) {

while (!a.flagIsSet()) {

loopcount++;

}

}

Is the same as:

void loopUntilFlagSet(Object a) {

boolean flagIsSet = a.flagIsSet();

while (!flagIsSet) {

loopcount++;

}

}

!
That’s what volatile is for...
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Writes can be eliminated
Intermediate values might never be visible

void updateDistance(Object a) {

int distance = 100;

a.setX(distance);

a.setX(distance * 2);

a.setX(distance * 3);

}

Is the same as

void updateDistance(Object a) {

a.setX(300);

}
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Writes can be eliminated
Intermediate values might never be visible

void updateDistance(Object a) {

a. setVisibleValue(0);

for (int i = 0; i < 1000000; i++) {

a.setInternalValue(i);

}

a.setVisibleValue(a.getInternalValue());

}

Is the same as

void updateDistance(Object a) {

a.setInternalValue(1000000);

a.setVisibleValue(1000000);

}
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Inlining...
public class Thing {

private int x;

public final int getX() { return x };

}

...

myX = thing.getX();

Is the same as

Class Thing {

int x;

}

...

myX = thing.x;
Speculative compiler tricks
JIT compilers can do things that
static compilers can have
a hard time with…
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Class Hierarchy Analysis (CHA)
Can perform global analysis on currently loaded code

Deduce stuff about inheritance, method overrides, etc.

Can make optimization decisions based on assumptions

Re-evaluate assumptions when loading new classes

Throw away code that conflicts with assumptions
before class loading makes them invalid
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Inlining works without “final”
public class Thing {

private int x;

public int getX() { return x };

}

...

myX = thing.getX();

Is the same as

Class Thing {

int x;

}

...

myX = thing.x;

As long as there is only one implementer of getX()
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
The power of the “uncommon trap”

Being able throw away wrong code is very useful

E.g. Speculatively assuming callee type

polymorphic can be “monomorphic” or “megamorphic”

E.g. Can make virtual calls direct even without CHA

E.g. Can speculatively inline things

E.g. Speculatively assuming branch behavior

We’ve only ever seen this thing go one way, so....
More Speculative stuff
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Untaken path example
“Never taken” paths can be optimized away with benefits:

void computeMagnitude(int val) {

if (val > 10) {

scale = computeScale(val);

else {

scale = 1;

}

return scale + 9;

}

When all values so far were <= 10 can be compiled to:

void computeMagnitude(int val) {

if (val > 10) uncommonTrap();

return 10;

}
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Implicit Null Check example
All field and array access in Java is null checked

x = foo.x;

is (in equivalent required machine code):

if (foo == null)

throw new NullPointerException();

x = foo.x;

!
But compiler can “hope” for non-nulls, and handle SEGV

<Point where later SEGV will appear to throw>

x = foo.x;

This is faster *IF* no nulls are encountered…
Deoptimization
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Deoptimization:

Adaptive compilation is… adaptive
Micro-benchmarking is a black art

So is the art of the Warmup

Running code long enough to compile is just the start…

Deoptimization can occur at any time

often occur after you *think* the code is warmed up.

Many potential causes
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Warmup often doesn’t cut it…
Common Example:

Trading system wants to have the first trade be fast

So run 20,000 “fake” messages through the system to warm up

let JIT compilers optimize, learn, and deopt before actual trades

What really happens

Code is written to do different things “if this is a fake message”

e.g. “Don’t send to the exchange if this is a fake message”

JITs optimize for fake path, including speculatively assuming “fake”

First real message through deopts...
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Fun In a Box:

A simple Deoptimization example
Deoptimization due to lazy loading/initialization

Two classes: ThingOne and ThingTwo

Both are actively called in the same method

But compiler kicks in before one is ever called

JIT cannot generate call for uninitialized class

So it leaves an uncommon trap on that path…

And deopts later if it ever gets there.
https://github.com/giltene/GilExamples/blob/master/src/main/java/FunInABox.java
public	
  class	
  FunInABox	
  {	
  
	
  	
  	
  	
  static	
  final	
  int	
  THING_ONE_THREASHOLD	
  =	
  20000000	
  
	
  	
  	
  	
  .	
  
	
  	
  	
  	
  .	
  
	
  	
  	
  	
  .	
  	
  	
  	
  	
  
	
  	
  	
  	
  static	
  public	
  class	
  ThingOne	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  static	
  long	
  valueOne	
  =	
  0;	
  
!
	
  	
  	
  	
  	
  	
  	
  	
  static	
  long	
  getValue()	
  {	
  return	
  valueOne++;	
  }	
  
	
  	
  	
  	
  }	
  
!
	
  	
  	
  	
  static	
  public	
  class	
  ThingTwo	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  static	
  long	
  valueTwo	
  =	
  3;	
  
!
	
  	
  	
  	
  	
  	
  	
  	
  static	
  long	
  getValue()	
  {	
  return	
  valueTwo++;	
  }	
  
	
  	
  	
  	
  }	
  
!
	
  	
  	
  	
  public	
  static	
  long	
  testRun(int	
  iterations)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  long	
  sum	
  =	
  0;	
  
!
	
  	
  	
  	
  	
  	
  	
  	
  for(int	
  iter	
  =	
  0;	
  iter	
  <	
  iterations;	
  iter++)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  if	
  (iter	
  >	
  THING_ONE_THREASHOLD)	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sum	
  +=	
  ThingOne.getValue();	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  else	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  sum	
  +=	
  ThingTwo.getValue();	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  sum;	
  
	
  	
  	
  	
  }
Deopt example: Fun In a Box
Lumpy.local-40% !
Lumpy.local-40% java -XX:+PrintCompilation FunInABox
77 1 java.lang.String::hashCode (64 bytes)!
109 2 sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes)!
115 3 java.math.BigInteger::mulAdd (81 bytes)!
118 4 java.math.BigInteger::multiplyToLen (219 bytes)!
121 5 java.math.BigInteger::addOne (77 bytes)!
123 6 java.math.BigInteger::squareToLen (172 bytes)!
127 7 java.math.BigInteger::primitiveLeftShift (79 bytes)!
130 8 java.math.BigInteger::montReduce (99 bytes)!
140 1% java.math.BigInteger::multiplyToLen @ 138 (219 bytes)!
Starting warmup run (will only use ThingTwo):!
147 9 sun.security.provider.SHA::implCompress (491 bytes)!
153 10 java.lang.String::charAt (33 bytes)!
154 11 FunInABox$ThingTwo::getValue (10 bytes)!
154 2% FunInABox::testRun @ 4 (38 bytes)!
161 12 FunInABox::testRun (38 bytes)!
Warmup run [1000000 iterations] took 27 msec..!
!
...Then, out of the box!
Came Thing Two and Thing One!!
And they ran to us fast!
They said, "How do you do?"...!
!
Starting actual run (will start using ThingOne a bit after using
ThingTwo):!
5183 12 made not entrant FunInABox::testRun (38 bytes)!
5184 2% made not entrant FunInABox::testRun @ -2 (38 bytes)!
5184 3% FunInABox::testRun @ 4 (38 bytes)!
5184 13 FunInABox$ThingOne::getValue (10 bytes)!
Test run [200000000 iterations] took 1299 msec...
Deopt example: Fun In a Box
 	
  	
  	
  .	
  
	
  	
  	
  	
  .	
  
	
  	
  	
  	
  .	
  
	
  	
  	
  	
  public	
  static	
  <T>	
  Class<T>	
  forceInit(Class<T>	
  klass)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  //	
  Forces	
  actual	
  initialization	
  (not	
  just	
  loading)	
  of	
  the	
  class	
  klass:	
  
	
  	
  	
  	
  	
  	
  	
  	
  try	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Class.forName(klass.getName(),	
  true,	
  klass.getClassLoader());	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  catch	
  (ClassNotFoundException	
  e)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  throw	
  new	
  AssertionError(e);	
  	
  //	
  Can't	
  happen	
  
	
  	
  	
  	
  	
  	
  	
  	
  }	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  klass;	
  
	
  	
  	
  	
  }	
  
!
	
  	
  	
  	
  public	
  static	
  void	
  tameTheThings()	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  forceInit(ThingOne.class);	
  
	
  	
  	
  	
  	
  	
  	
  	
  forceInit(ThingTwo.class);	
  
	
  	
  	
  	
  }	
  
	
  	
  	
  	
  .	
  
	
  	
  	
  	
  .	
  
	
  	
  	
  	
  .
Deopt example: Fun In a Box
https://github.com/giltene/GilExamples/blob/master/src/main/java/FunInABox.java
Lumpy.local-41% !
Lumpy.local-41% java -XX:+PrintCompilation FunInABox KeepThingsTame!
75 1 java.lang.String::hashCode (64 bytes)!
107 2 sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes)!
113 3 java.math.BigInteger::mulAdd (81 bytes)!
115 4 java.math.BigInteger::multiplyToLen (219 bytes)!
119 5 java.math.BigInteger::addOne (77 bytes)!
121 6 java.math.BigInteger::squareToLen (172 bytes)!
125 7 java.math.BigInteger::primitiveLeftShift (79 bytes)!
127 8 java.math.BigInteger::montReduce (99 bytes)!
133 1% java.math.BigInteger::multiplyToLen @ 138 (219 bytes)!
Keeping ThingOne and ThingTwo tame (by initializing them ahead of time):!
Starting warmup run (will only use ThingTwo):!
140 9 sun.security.provider.SHA::implCompress (491 bytes)!
147 10 java.lang.String::charAt (33 bytes)!
147 11 FunInABox$ThingTwo::getValue (10 bytes)!
147 2% FunInABox::testRun @ 4 (38 bytes)!
154 12 FunInABox::testRun (38 bytes)!
Warmup run [1000000 iterations] took 24 msec..!
!
...Then, out of the box!
Came Thing Two and Thing One!!
And they ran to us fast!
They said, "How do you do?"...!
!
Starting actual run (will start using ThingOne a bit after using
ThingTwo):!
5178 13 FunInABox$ThingOne::getValue (10 bytes)!
Test run [200000000 iterations] took 2164 msec...
Deopt example: Fun In a Box
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Example causes for depotimization

at Market Open
First calls to method in an uninitialized class

First call to a method in a not-yet-loaded class

Dynamic branch elimination hitting an unexpected path

Implicit Null Check hitting a null
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Java’s “Just In Time” Reality
Starts slow, learns fast

Lazy loading & initialization

Aggressively optimized for
the common case

(temporarily) Reverts to
slower execution to adapt
Warmup
Deoptimization
. . .
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Starts slow, learns fast

Lazy loading & initialization

Aggressively optimized for
the common case

(temporarily) Reverts to
slower execution to adapt
What we have What we want
No Slow Trades
ReadyNow!
to the rescue
Java’s “Just In Time” Reality
©2012 Azul Systems, Inc.	
 	
 	
 	
 	
 	
What can we do about it?
Zing has a new feature set called “ReadyNow!”

Focused on avoiding deoptimization while keeping code fast

First of all, paying attention matters

E.g. Some of those dynamic branch eliminations have no benefit…

Adds optional controls for helpful things like:

Aggressive class loading (load when they come into scope)

Safe pre-initialization of classes with empty static initializers

Per method compiler directives (e.g. disable ImplicitNullChecks)

…

The feature set keep growing…
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Java at Market Open
. . .
Market Open
Deoptimization
ReadyNow!
avoids
deoptimization
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Java at Market Open
. . .
Market Open
With Zing & ReadyNow!
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
Java at Market Open
. . .
Market Open
With ReadyNow!
Warmup?
Avoids
Restarts
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
. . .
Market Open
With ReadyNow! and
No Overnight Restarts
!
Start Fast & Stay Fast
Java at Market Open
©2013 Azul Systems, Inc.	
 	
 	
 	
 	
 	
One liner takeaway
. . .
Zing: A cure for the Java hiccups
Market Open

More Related Content

What's hot

Lockless Producer Consumer Threads: Asynchronous Communications Made Easy
Lockless Producer Consumer Threads: Asynchronous Communications Made EasyLockless Producer Consumer Threads: Asynchronous Communications Made Easy
Lockless Producer Consumer Threads: Asynchronous Communications Made Easy
ICS
 
Java Serialization
Java SerializationJava Serialization
Java Serialization
jeslie
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity FrameworkDoncho Minkov
 
Advanced Production Debugging
Advanced Production DebuggingAdvanced Production Debugging
Advanced Production Debugging
Takipi
 
Epoxy 介紹
Epoxy 介紹Epoxy 介紹
Epoxy 介紹
Kros Huang
 
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi..."Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
Vadym Kazulkin
 
How Scala code is expressed in the JVM
How Scala code is expressed in the JVMHow Scala code is expressed in the JVM
How Scala code is expressed in the JVM
Koichi Sakata
 
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov Nayden Gochev
 
Software Uni Conf October 2014
Software Uni Conf October 2014Software Uni Conf October 2014
Software Uni Conf October 2014Nayden Gochev
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Marcos García
 
SoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringSoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with Spring
Nayden Gochev
 
Multithreading and concurrency in android
Multithreading and concurrency in androidMultithreading and concurrency in android
Multithreading and concurrency in android
Rakesh Jha
 
Actor Model Akka Framework
Actor Model Akka FrameworkActor Model Akka Framework
Actor Model Akka Framework
Harinath Krishnamoorthy
 
Lambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter LawreyLambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter Lawrey
JAXLondon_Conference
 
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaDataGPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
Codemotion Tel Aviv
 
Kogito: cloud native business automation
Kogito: cloud native business automationKogito: cloud native business automation
Kogito: cloud native business automation
Mario Fusco
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsSerge Stinckwich
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
Saleem Ansari
 

What's hot (20)

Networking
NetworkingNetworking
Networking
 
Lockless Producer Consumer Threads: Asynchronous Communications Made Easy
Lockless Producer Consumer Threads: Asynchronous Communications Made EasyLockless Producer Consumer Threads: Asynchronous Communications Made Easy
Lockless Producer Consumer Threads: Asynchronous Communications Made Easy
 
Java Serialization
Java SerializationJava Serialization
Java Serialization
 
ADO.NET Entity Framework
ADO.NET Entity FrameworkADO.NET Entity Framework
ADO.NET Entity Framework
 
Advanced Production Debugging
Advanced Production DebuggingAdvanced Production Debugging
Advanced Production Debugging
 
Epoxy 介紹
Epoxy 介紹Epoxy 介紹
Epoxy 介紹
 
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi..."Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
"Java memory model for practitioners" at JavaLand 2017 by Vadym Kazulkin/Rodi...
 
How Scala code is expressed in the JVM
How Scala code is expressed in the JVMHow Scala code is expressed in the JVM
How Scala code is expressed in the JVM
 
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
Lecture from javaday.bg by Nayden Gochev/ Ivan Ivanov and Mitia Alexandrov
 
Software Uni Conf October 2014
Software Uni Conf October 2014Software Uni Conf October 2014
Software Uni Conf October 2014
 
Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)Quick introduction to Java Garbage Collector (JVM GC)
Quick introduction to Java Garbage Collector (JVM GC)
 
SoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with SpringSoftwareUniversity seminar fast REST Api with Spring
SoftwareUniversity seminar fast REST Api with Spring
 
Getting started with entity framework
Getting started with entity framework Getting started with entity framework
Getting started with entity framework
 
Multithreading and concurrency in android
Multithreading and concurrency in androidMultithreading and concurrency in android
Multithreading and concurrency in android
 
Actor Model Akka Framework
Actor Model Akka FrameworkActor Model Akka Framework
Actor Model Akka Framework
 
Lambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter LawreyLambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter Lawrey
 
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaDataGPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
GPARS: Lessons from the parallel universe - Itamar Tayer, CoolaData
 
Kogito: cloud native business automation
Kogito: cloud native business automationKogito: cloud native business automation
Kogito: cloud native business automation
 
Using Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systemsUsing Smalltalk for controlling robotics systems
Using Smalltalk for controlling robotics systems
 
Introduction to Scala
Introduction to ScalaIntroduction to Scala
Introduction to Scala
 

Viewers also liked

What's New in the JVM in Java 8?
What's New in the JVM in Java 8?What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
Azul Systems Inc.
 
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie EnvironmentsDotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
Azul Systems Inc.
 
Zulu Embedded Java Introduction
Zulu Embedded Java IntroductionZulu Embedded Java Introduction
Zulu Embedded Java Introduction
Azul Systems Inc.
 
Towards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding StyleTowards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding Style
Azul Systems Inc.
 
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Azul Systems Inc.
 
How NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkHow NOT to Write a Microbenchmark
How NOT to Write a Microbenchmark
Azul Systems Inc.
 
Experiences with Debugging Data Races
Experiences with Debugging Data RacesExperiences with Debugging Data Races
Experiences with Debugging Data Races
Azul Systems Inc.
 
Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...
Azul Systems Inc.
 
The Java Evolution Mismatch - Why You Need a Better JVM
The Java Evolution Mismatch - Why You Need a Better JVMThe Java Evolution Mismatch - Why You Need a Better JVM
The Java Evolution Mismatch - Why You Need a Better JVM
Azul Systems Inc.
 
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Azul Systems Inc.
 
Lock-Free, Wait-Free Hash Table
Lock-Free, Wait-Free Hash TableLock-Free, Wait-Free Hash Table
Lock-Free, Wait-Free Hash Table
Azul Systems Inc.
 
What's Inside a JVM?
What's Inside a JVM?What's Inside a JVM?
What's Inside a JVM?
Azul Systems Inc.
 
Java vs. C/C++
Java vs. C/C++Java vs. C/C++
Java vs. C/C++
Azul Systems Inc.
 
C++vs java
C++vs javaC++vs java
C++vs java
Pradeep wolf king
 

Viewers also liked (14)

What's New in the JVM in Java 8?
What's New in the JVM in Java 8?What's New in the JVM in Java 8?
What's New in the JVM in Java 8?
 
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie EnvironmentsDotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
DotCMS Bootcamp: Enabling Java in Latency Sensitivie Environments
 
Zulu Embedded Java Introduction
Zulu Embedded Java IntroductionZulu Embedded Java Introduction
Zulu Embedded Java Introduction
 
Towards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding StyleTowards a Scalable Non-Blocking Coding Style
Towards a Scalable Non-Blocking Coding Style
 
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
Speculative Locking: Breaking the Scale Barrier (JAOO 2005)
 
How NOT to Write a Microbenchmark
How NOT to Write a MicrobenchmarkHow NOT to Write a Microbenchmark
How NOT to Write a Microbenchmark
 
Experiences with Debugging Data Races
Experiences with Debugging Data RacesExperiences with Debugging Data Races
Experiences with Debugging Data Races
 
Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...Webinar: Zing Vision: Answering your toughest production Java performance que...
Webinar: Zing Vision: Answering your toughest production Java performance que...
 
The Java Evolution Mismatch - Why You Need a Better JVM
The Java Evolution Mismatch - Why You Need a Better JVMThe Java Evolution Mismatch - Why You Need a Better JVM
The Java Evolution Mismatch - Why You Need a Better JVM
 
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
Start Fast and Stay Fast - Priming Java for Market Open with ReadyNow!
 
Lock-Free, Wait-Free Hash Table
Lock-Free, Wait-Free Hash TableLock-Free, Wait-Free Hash Table
Lock-Free, Wait-Free Hash Table
 
What's Inside a JVM?
What's Inside a JVM?What's Inside a JVM?
What's Inside a JVM?
 
Java vs. C/C++
Java vs. C/C++Java vs. C/C++
Java vs. C/C++
 
C++vs java
C++vs javaC++vs java
C++vs java
 

Similar to Priming Java for Speed at Market Open

Good code
Good codeGood code
Good code
Jane Prusakova
 
Java tut1
Java tut1Java tut1
Java tut1
Ajmal Khan
 
Tutorial java
Tutorial javaTutorial java
Tutorial java
Abdul Aziz
 
Java Tut1
Java Tut1Java Tut1
Java Tut1
guest5c8bd1
 
From clever code to better code
From clever code to better codeFrom clever code to better code
From clever code to better code
Dror Helper
 
Java tutorial PPT
Java tutorial  PPTJava tutorial  PPT
Java tutorial PPT
Intelligo Technologies
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
Intelligo Technologies
 
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
PROIDEA
 
Effecient javascript
Effecient javascriptEffecient javascript
Effecient javascript
mpnkhan
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09
Guy Korland
 
The things we don't see – stories of Software, Scala and Akka
The things we don't see – stories of Software, Scala and AkkaThe things we don't see – stories of Software, Scala and Akka
The things we don't see – stories of Software, Scala and Akka
Konrad Malawski
 
Java best practices
Java best practicesJava best practices
Java best practices
Ray Toal
 
Technology: A Means to an End with Thibault Imbert
Technology: A Means to an End with Thibault ImbertTechnology: A Means to an End with Thibault Imbert
Technology: A Means to an End with Thibault Imbert
FITC
 
FITC '14 Toronto - Technology, a means to an end
FITC '14 Toronto - Technology, a means to an endFITC '14 Toronto - Technology, a means to an end
FITC '14 Toronto - Technology, a means to an end
Thibault Imbert
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
Doug Hawkins
 
Thinking In Swift
Thinking In SwiftThinking In Swift
Thinking In Swift
Janie Clayton
 
ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6
Kevin DeRudder
 

Similar to Priming Java for Speed at Market Open (20)

Good code
Good codeGood code
Good code
 
Java tut1
Java tut1Java tut1
Java tut1
 
Java Tutorial
Java TutorialJava Tutorial
Java Tutorial
 
Tutorial java
Tutorial javaTutorial java
Tutorial java
 
Java Tut1
Java Tut1Java Tut1
Java Tut1
 
From clever code to better code
From clever code to better codeFrom clever code to better code
From clever code to better code
 
Java tutorial PPT
Java tutorial  PPTJava tutorial  PPT
Java tutorial PPT
 
Java tutorial PPT
Java tutorial PPTJava tutorial PPT
Java tutorial PPT
 
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
 
Java
JavaJava
Java
 
Effecient javascript
Effecient javascriptEffecient javascript
Effecient javascript
 
Deuce STM - CMP'09
Deuce STM - CMP'09Deuce STM - CMP'09
Deuce STM - CMP'09
 
The things we don't see – stories of Software, Scala and Akka
The things we don't see – stories of Software, Scala and AkkaThe things we don't see – stories of Software, Scala and Akka
The things we don't see – stories of Software, Scala and Akka
 
Java best practices
Java best practicesJava best practices
Java best practices
 
C++ tutorial
C++ tutorialC++ tutorial
C++ tutorial
 
Technology: A Means to an End with Thibault Imbert
Technology: A Means to an End with Thibault ImbertTechnology: A Means to an End with Thibault Imbert
Technology: A Means to an End with Thibault Imbert
 
FITC '14 Toronto - Technology, a means to an end
FITC '14 Toronto - Technology, a means to an endFITC '14 Toronto - Technology, a means to an end
FITC '14 Toronto - Technology, a means to an end
 
JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?JVM Mechanics: When Does the JVM JIT & Deoptimize?
JVM Mechanics: When Does the JVM JIT & Deoptimize?
 
Thinking In Swift
Thinking In SwiftThinking In Swift
Thinking In Swift
 
ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6ECMAScript.Next ECMAScipt 6
ECMAScript.Next ECMAScipt 6
 

More from Azul Systems Inc.

Advancements ingc andc4overview_linkedin_oct2017
Advancements ingc andc4overview_linkedin_oct2017Advancements ingc andc4overview_linkedin_oct2017
Advancements ingc andc4overview_linkedin_oct2017
Azul Systems Inc.
 
Understanding GC, JavaOne 2017
Understanding GC, JavaOne 2017Understanding GC, JavaOne 2017
Understanding GC, JavaOne 2017
Azul Systems Inc.
 
Azul Systems open source guide
Azul Systems open source guideAzul Systems open source guide
Azul Systems open source guide
Azul Systems Inc.
 
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and ToolsIntelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Azul Systems Inc.
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage Collection
Azul Systems Inc.
 
The evolution of OpenJDK: From Java's beginnings to 2014
The evolution of OpenJDK: From Java's beginnings to 2014The evolution of OpenJDK: From Java's beginnings to 2014
The evolution of OpenJDK: From Java's beginnings to 2014
Azul Systems Inc.
 
Push Technology's latest data distribution benchmark with Solarflare and Zing
Push Technology's latest data distribution benchmark with Solarflare and ZingPush Technology's latest data distribution benchmark with Solarflare and Zing
Push Technology's latest data distribution benchmark with Solarflare and ZingAzul Systems Inc.
 
The Art of Java Benchmarking
The Art of Java BenchmarkingThe Art of Java Benchmarking
The Art of Java Benchmarking
Azul Systems Inc.
 
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, PolandAzul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Systems Inc.
 
Understanding Application Hiccups - and What You Can Do About Them
Understanding Application Hiccups - and What You Can Do About ThemUnderstanding Application Hiccups - and What You Can Do About Them
Understanding Application Hiccups - and What You Can Do About Them
Azul Systems Inc.
 
JVM Memory Management Details
JVM Memory Management DetailsJVM Memory Management Details
JVM Memory Management Details
Azul Systems Inc.
 
Enterprise Search Summit - Speeding Up Search
Enterprise Search Summit - Speeding Up SearchEnterprise Search Summit - Speeding Up Search
Enterprise Search Summit - Speeding Up Search
Azul Systems Inc.
 
Understanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItUnderstanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About It
Azul Systems Inc.
 
Enabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive ApplicationsEnabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive Applications
Azul Systems Inc.
 
Java at Scale, Dallas JUG, October 2013
Java at Scale, Dallas JUG, October 2013Java at Scale, Dallas JUG, October 2013
Java at Scale, Dallas JUG, October 2013
Azul Systems Inc.
 

More from Azul Systems Inc. (15)

Advancements ingc andc4overview_linkedin_oct2017
Advancements ingc andc4overview_linkedin_oct2017Advancements ingc andc4overview_linkedin_oct2017
Advancements ingc andc4overview_linkedin_oct2017
 
Understanding GC, JavaOne 2017
Understanding GC, JavaOne 2017Understanding GC, JavaOne 2017
Understanding GC, JavaOne 2017
 
Azul Systems open source guide
Azul Systems open source guideAzul Systems open source guide
Azul Systems open source guide
 
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and ToolsIntelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
Intelligent Trading Summit NY 2014: Understanding Latency: Key Lessons and Tools
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage Collection
 
The evolution of OpenJDK: From Java's beginnings to 2014
The evolution of OpenJDK: From Java's beginnings to 2014The evolution of OpenJDK: From Java's beginnings to 2014
The evolution of OpenJDK: From Java's beginnings to 2014
 
Push Technology's latest data distribution benchmark with Solarflare and Zing
Push Technology's latest data distribution benchmark with Solarflare and ZingPush Technology's latest data distribution benchmark with Solarflare and Zing
Push Technology's latest data distribution benchmark with Solarflare and Zing
 
The Art of Java Benchmarking
The Art of Java BenchmarkingThe Art of Java Benchmarking
The Art of Java Benchmarking
 
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, PolandAzul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
Azul Zulu on Azure Overview -- OpenTech CEE Workshop, Warsaw, Poland
 
Understanding Application Hiccups - and What You Can Do About Them
Understanding Application Hiccups - and What You Can Do About ThemUnderstanding Application Hiccups - and What You Can Do About Them
Understanding Application Hiccups - and What You Can Do About Them
 
JVM Memory Management Details
JVM Memory Management DetailsJVM Memory Management Details
JVM Memory Management Details
 
Enterprise Search Summit - Speeding Up Search
Enterprise Search Summit - Speeding Up SearchEnterprise Search Summit - Speeding Up Search
Enterprise Search Summit - Speeding Up Search
 
Understanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About ItUnderstanding Java Garbage Collection - And What You Can Do About It
Understanding Java Garbage Collection - And What You Can Do About It
 
Enabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive ApplicationsEnabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive Applications
 
Java at Scale, Dallas JUG, October 2013
Java at Scale, Dallas JUG, October 2013Java at Scale, Dallas JUG, October 2013
Java at Scale, Dallas JUG, October 2013
 

Recently uploaded

Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
MayankTawar1
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
Tendenci - The Open Source AMS (Association Management Software)
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
NaapbooksPrivateLimi
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
Peter Caitens
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
Ortus Solutions, Corp
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 

Recently uploaded (20)

Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Software Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdfSoftware Testing Exam imp Ques Notes.pdf
Software Testing Exam imp Ques Notes.pdf
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Corporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMSCorporate Management | Session 3 of 3 | Tendenci AMS
Corporate Management | Session 3 of 3 | Tendenci AMS
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Visitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.appVisitor Management System in India- Vizman.app
Visitor Management System in India- Vizman.app
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 

Priming Java for Speed at Market Open

  • 1. ©2013 Azul Systems, Inc. Priming Java for Speed at Market Open ! Getting Fast & Staying Fast Gil Tene, CTO & co-Founder, Azul Systems
  • 2. ©2012 Azul Systems, Inc. High level agenda Intro Java realities at Market Open A whole bunch of compiler optimization stuff Deoptimization… What we can do about it
  • 3. ©2013 Azul Systems, Inc. ©2013 Azul Systems, Inc. About me: Gil Tene co-founder, CTO @Azul Systems Have been working on “think different” GC approaches since 2002 At Azul we make JVMs that dramatically improve latency behavior As a result, we end up working a lot with low latency trading systems And (after GC is solved) the Market Open problem seems to dominate concerns * working on real-world trash compaction issues, circa 2004
  • 4. ©2013 Azul Systems, Inc. Are you fast at Market Open?
  • 5. ©2013 Azul Systems, Inc. Java at Market Open . . . Market Open
  • 6. ©2013 Azul Systems, Inc. Java’s “Just In Time” Reality Starts slow, learns fast Lazy loading & initialization Aggressively optimized for the common case (temporarily) Reverts to slower execution to adapt Warmup Deoptimization . . .
  • 9. ©2012 Azul Systems, Inc. Code can be reordered... int doMath(int x, int y, int z) { int a = x + y; int b = x - y; int c = z + x; return a + b; } Can be reordered to: int doMath(int x, int y, int z) { int c = z + x; int b = x - y; int a = x + y; return a + b; }
  • 10. ©2012 Azul Systems, Inc. Dead code can be removed int doMath(int x, int y, int z) { int a = x + y; int b = x - y; int c = z + x; return a + b; } ! Can be reduced to: ! int doMath(int x, int y, int z) { int a = x + y; int b = x - y; return a + b; }
  • 11. ©2012 Azul Systems, Inc. Values can be propagated int doMath(int x, int y, int z) { int a = x + y; int b = x - y; int c = z + x; return a + b; } ! Can be reduced to: ! int doMath(int x, int y, int z) { return x + y + x - y; } !
  • 12. ©2012 Azul Systems, Inc. Math can be simplified int doMath(int x, int y, int z) { int a = x + y; int b = x - y; int c = z + x; return a + b; } ! Can be reduced to: ! int doMath(int x, int y, int z) { return x + x; } !
  • 14. ©2012 Azul Systems, Inc. Reads can be cached int distanceRatio(Object a) { int distanceTo = a.getX() - start; int distanceAfter = end - a.getX(); return distanceTo/distanceAfter; } Is the same as int distanceRatio(Object a) { int x = a.getX(); int distanceTo = x - start; int distanceAfter = end - x; return distanceTo/distanceAfter; }
  • 15. ©2012 Azul Systems, Inc. Reads can be cached void loopUntilFlagSet(Object a) { while (!a.flagIsSet()) { loopcount++; } } Is the same as: void loopUntilFlagSet(Object a) { boolean flagIsSet = a.flagIsSet(); while (!flagIsSet) { loopcount++; } } ! That’s what volatile is for...
  • 16. ©2012 Azul Systems, Inc. Writes can be eliminated Intermediate values might never be visible void updateDistance(Object a) { int distance = 100; a.setX(distance); a.setX(distance * 2); a.setX(distance * 3); } Is the same as void updateDistance(Object a) { a.setX(300); }
  • 17. ©2012 Azul Systems, Inc. Writes can be eliminated Intermediate values might never be visible void updateDistance(Object a) { a. setVisibleValue(0); for (int i = 0; i < 1000000; i++) { a.setInternalValue(i); } a.setVisibleValue(a.getInternalValue()); } Is the same as void updateDistance(Object a) { a.setInternalValue(1000000); a.setVisibleValue(1000000); }
  • 18. ©2012 Azul Systems, Inc. Inlining... public class Thing { private int x; public final int getX() { return x }; } ... myX = thing.getX(); Is the same as Class Thing { int x; } ... myX = thing.x;
  • 19. Speculative compiler tricks JIT compilers can do things that static compilers can have a hard time with…
  • 20. ©2012 Azul Systems, Inc. Class Hierarchy Analysis (CHA) Can perform global analysis on currently loaded code Deduce stuff about inheritance, method overrides, etc. Can make optimization decisions based on assumptions Re-evaluate assumptions when loading new classes Throw away code that conflicts with assumptions before class loading makes them invalid
  • 21. ©2012 Azul Systems, Inc. Inlining works without “final” public class Thing { private int x; public int getX() { return x }; } ... myX = thing.getX(); Is the same as Class Thing { int x; } ... myX = thing.x; As long as there is only one implementer of getX()
  • 22. ©2012 Azul Systems, Inc. The power of the “uncommon trap” Being able throw away wrong code is very useful E.g. Speculatively assuming callee type polymorphic can be “monomorphic” or “megamorphic” E.g. Can make virtual calls direct even without CHA E.g. Can speculatively inline things E.g. Speculatively assuming branch behavior We’ve only ever seen this thing go one way, so.... More Speculative stuff
  • 23. ©2012 Azul Systems, Inc. Untaken path example “Never taken” paths can be optimized away with benefits: void computeMagnitude(int val) { if (val > 10) { scale = computeScale(val); else { scale = 1; } return scale + 9; } When all values so far were <= 10 can be compiled to: void computeMagnitude(int val) { if (val > 10) uncommonTrap(); return 10; }
  • 24. ©2012 Azul Systems, Inc. Implicit Null Check example All field and array access in Java is null checked x = foo.x; is (in equivalent required machine code): if (foo == null) throw new NullPointerException(); x = foo.x; ! But compiler can “hope” for non-nulls, and handle SEGV <Point where later SEGV will appear to throw> x = foo.x; This is faster *IF* no nulls are encountered…
  • 26. ©2012 Azul Systems, Inc. Deoptimization: Adaptive compilation is… adaptive Micro-benchmarking is a black art So is the art of the Warmup Running code long enough to compile is just the start… Deoptimization can occur at any time often occur after you *think* the code is warmed up. Many potential causes
  • 27. ©2012 Azul Systems, Inc. Warmup often doesn’t cut it… Common Example: Trading system wants to have the first trade be fast So run 20,000 “fake” messages through the system to warm up let JIT compilers optimize, learn, and deopt before actual trades What really happens Code is written to do different things “if this is a fake message” e.g. “Don’t send to the exchange if this is a fake message” JITs optimize for fake path, including speculatively assuming “fake” First real message through deopts...
  • 28. ©2012 Azul Systems, Inc. Fun In a Box: A simple Deoptimization example Deoptimization due to lazy loading/initialization Two classes: ThingOne and ThingTwo Both are actively called in the same method But compiler kicks in before one is ever called JIT cannot generate call for uninitialized class So it leaves an uncommon trap on that path… And deopts later if it ever gets there. https://github.com/giltene/GilExamples/blob/master/src/main/java/FunInABox.java
  • 29. public  class  FunInABox  {          static  final  int  THING_ONE_THREASHOLD  =  20000000          .          .          .                  static  public  class  ThingOne  {                  static  long  valueOne  =  0;   !                static  long  getValue()  {  return  valueOne++;  }          }   !        static  public  class  ThingTwo  {                  static  long  valueTwo  =  3;   !                static  long  getValue()  {  return  valueTwo++;  }          }   !        public  static  long  testRun(int  iterations)  {                  long  sum  =  0;   !                for(int  iter  =  0;  iter  <  iterations;  iter++)  {                          if  (iter  >  THING_ONE_THREASHOLD)                                  sum  +=  ThingOne.getValue();                          else                                  sum  +=  ThingTwo.getValue();                  }                  return  sum;          } Deopt example: Fun In a Box
  • 30. Lumpy.local-40% ! Lumpy.local-40% java -XX:+PrintCompilation FunInABox 77 1 java.lang.String::hashCode (64 bytes)! 109 2 sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes)! 115 3 java.math.BigInteger::mulAdd (81 bytes)! 118 4 java.math.BigInteger::multiplyToLen (219 bytes)! 121 5 java.math.BigInteger::addOne (77 bytes)! 123 6 java.math.BigInteger::squareToLen (172 bytes)! 127 7 java.math.BigInteger::primitiveLeftShift (79 bytes)! 130 8 java.math.BigInteger::montReduce (99 bytes)! 140 1% java.math.BigInteger::multiplyToLen @ 138 (219 bytes)! Starting warmup run (will only use ThingTwo):! 147 9 sun.security.provider.SHA::implCompress (491 bytes)! 153 10 java.lang.String::charAt (33 bytes)! 154 11 FunInABox$ThingTwo::getValue (10 bytes)! 154 2% FunInABox::testRun @ 4 (38 bytes)! 161 12 FunInABox::testRun (38 bytes)! Warmup run [1000000 iterations] took 27 msec..! ! ...Then, out of the box! Came Thing Two and Thing One!! And they ran to us fast! They said, "How do you do?"...! ! Starting actual run (will start using ThingOne a bit after using ThingTwo):! 5183 12 made not entrant FunInABox::testRun (38 bytes)! 5184 2% made not entrant FunInABox::testRun @ -2 (38 bytes)! 5184 3% FunInABox::testRun @ 4 (38 bytes)! 5184 13 FunInABox$ThingOne::getValue (10 bytes)! Test run [200000000 iterations] took 1299 msec... Deopt example: Fun In a Box
  • 31.        .          .          .          public  static  <T>  Class<T>  forceInit(Class<T>  klass)  {                  //  Forces  actual  initialization  (not  just  loading)  of  the  class  klass:                  try  {                          Class.forName(klass.getName(),  true,  klass.getClassLoader());                  }  catch  (ClassNotFoundException  e)  {                          throw  new  AssertionError(e);    //  Can't  happen                  }                  return  klass;          }   !        public  static  void  tameTheThings()  {                  forceInit(ThingOne.class);                  forceInit(ThingTwo.class);          }          .          .          . Deopt example: Fun In a Box https://github.com/giltene/GilExamples/blob/master/src/main/java/FunInABox.java
  • 32. Lumpy.local-41% ! Lumpy.local-41% java -XX:+PrintCompilation FunInABox KeepThingsTame! 75 1 java.lang.String::hashCode (64 bytes)! 107 2 sun.nio.cs.UTF_8$Decoder::decodeArrayLoop (553 bytes)! 113 3 java.math.BigInteger::mulAdd (81 bytes)! 115 4 java.math.BigInteger::multiplyToLen (219 bytes)! 119 5 java.math.BigInteger::addOne (77 bytes)! 121 6 java.math.BigInteger::squareToLen (172 bytes)! 125 7 java.math.BigInteger::primitiveLeftShift (79 bytes)! 127 8 java.math.BigInteger::montReduce (99 bytes)! 133 1% java.math.BigInteger::multiplyToLen @ 138 (219 bytes)! Keeping ThingOne and ThingTwo tame (by initializing them ahead of time):! Starting warmup run (will only use ThingTwo):! 140 9 sun.security.provider.SHA::implCompress (491 bytes)! 147 10 java.lang.String::charAt (33 bytes)! 147 11 FunInABox$ThingTwo::getValue (10 bytes)! 147 2% FunInABox::testRun @ 4 (38 bytes)! 154 12 FunInABox::testRun (38 bytes)! Warmup run [1000000 iterations] took 24 msec..! ! ...Then, out of the box! Came Thing Two and Thing One!! And they ran to us fast! They said, "How do you do?"...! ! Starting actual run (will start using ThingOne a bit after using ThingTwo):! 5178 13 FunInABox$ThingOne::getValue (10 bytes)! Test run [200000000 iterations] took 2164 msec... Deopt example: Fun In a Box
  • 33. ©2012 Azul Systems, Inc. Example causes for depotimization at Market Open First calls to method in an uninitialized class First call to a method in a not-yet-loaded class Dynamic branch elimination hitting an unexpected path Implicit Null Check hitting a null
  • 34. ©2013 Azul Systems, Inc. Java’s “Just In Time” Reality Starts slow, learns fast Lazy loading & initialization Aggressively optimized for the common case (temporarily) Reverts to slower execution to adapt Warmup Deoptimization . . .
  • 35. ©2013 Azul Systems, Inc. Starts slow, learns fast Lazy loading & initialization Aggressively optimized for the common case (temporarily) Reverts to slower execution to adapt What we have What we want No Slow Trades ReadyNow! to the rescue Java’s “Just In Time” Reality
  • 36. ©2012 Azul Systems, Inc. What can we do about it? Zing has a new feature set called “ReadyNow!” Focused on avoiding deoptimization while keeping code fast First of all, paying attention matters E.g. Some of those dynamic branch eliminations have no benefit… Adds optional controls for helpful things like: Aggressive class loading (load when they come into scope) Safe pre-initialization of classes with empty static initializers Per method compiler directives (e.g. disable ImplicitNullChecks) … The feature set keep growing…
  • 37. ©2013 Azul Systems, Inc. Java at Market Open . . . Market Open Deoptimization ReadyNow! avoids deoptimization
  • 38. ©2013 Azul Systems, Inc. Java at Market Open . . . Market Open With Zing & ReadyNow!
  • 39. ©2013 Azul Systems, Inc. Java at Market Open . . . Market Open With ReadyNow! Warmup? Avoids Restarts
  • 40. ©2013 Azul Systems, Inc. . . . Market Open With ReadyNow! and No Overnight Restarts ! Start Fast & Stay Fast Java at Market Open
  • 41. ©2013 Azul Systems, Inc. One liner takeaway . . . Zing: A cure for the Java hiccups Market Open