SlideShare a Scribd company logo
Алексей	Федоров,	
Одноклассники
Counter	Wars
Зачем	вы	здесь?
3
Много интересных докладов в других залах
4
Counter
public interface Counter {
long get();
void increment();
}
5
Simple Counter
class SimpleCounter implements Counter {
private long value = 0;
public long get() {
return value;
}
public void increment() {
value++;
}
}
6
Volatile Counter
class VolatileCounter implements Counter {
volatile long value = 0;
public long get() {
return value;
}
public void increment() {
value++;
}
}
7
Volatile Counter
class VolatileCounter implements Counter {
volatile long value = 0;
public long get() {
return value;
}
public void increment() {
long oldValue = value; // read
long newValue = oldValue + 1; // modify
value = newValue; // write
}
}
8
class SynchronizedCounter implements Counter {
volatile long value = 0;
public synchronized long get() {
return value;
}
public synchronized void increment() {
value++;
}
}
Synchronized Counter
9
Synchronized Counter
class SynchronizedCounter implements Counter {
long value = 0;
public synchronized long get() {
return value;
}
public synchronized void increment() {
value++;
}
}
10
Тестовый стенд
Core(TM) i7-4770
4 x 2 x 2.0 Ghz (downscaled)
Linux Ubuntu 14.04.4
3.13.0-86-generic x86_64
taskset -c 0,1,2,3 (thread affinity)
11
Бенчмарки, op/µs
Thanks to Nitsan Wakart
http://psy-lob-saw.blogspot.ru/2014/06/jdk8-update-on-scalable-counters.html
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
LONG 308 267 182 220 180 86
VOLATILE_LONG 77 77 79 22 21 35
SYNCHRONIZED 26 43 27 12 12 13
Вывод	1:	синхронизация	чего-то	стоит
13
class LockCounter implements Counter {
long value;
final Lock lock = new ReentrantLock();
public long get() {
try {
lock.lock();
return value;
} finally {
lock.unlock();
}
}
}
public void add() {
try {
lock.lock();
value += 1;
} finally {
lock.unlock();
}
}
Lock Counter
14
Lock Counter
class LockCounter implements Counter {
long value;
final Lock lock = new ReentrantLock();
public long get() {
try {
lock.lock();
return value;
} finally {
lock.unlock();
}
}
}
public void add() {
try {
lock.lock();
value += 1;
} finally {
lock.unlock();
}
}
15
Бенчмарки, op/µs
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
SYNCHRONIZED 26 43 27 12 12 13
REENTRANTLOCK 32 32 18 5 20 20
http://mechanical-sympathy.blogspot.com/2011/11/java-lock-implementations.html
http://mechanical-sympathy.blogspot.com/2011/11/biased-locking-osr-and-benchmarking-fun.html
http://www.javaspecialist.ru/2011/11/synchronized-vs-reentrantlock.html
http://dev.cheremin.info/2011/11/synchronized-vs-reentrantlock.html
16
class LockCounter implements Counter {
long value;
final Lock lock = new ReentrantLock();
public long get() {
try {
lock.lock();
return value;
} finally {
lock.unlock();
}
}
}
public void add() {
try {
lock.lock();
value += 1;
} finally {
lock.unlock();
}
}
Lock Counter
17
class LockCounter implements Counter {
long value;
final Lock lock = new ReentrantLock(true);
public long get() {
try {
lock.lock();
return value;
} finally {
lock.unlock();
}
}
}
public void add() {
try {
lock.lock();
value += 1;
} finally {
lock.unlock();
}
}
Lock Counter
18
Бенчмарки, op/µs
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
SYNCHRONIZED 26 43 27 12 12 13
UNFAIR_LOCK 32 32 18 5 20 20
FAIR_LOCK
Насколько	медленнее,	чем	unfair	lock?
19
Бенчмарки, op/µs
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
SYNCHRONIZED 26 43 27 12 12 13
UNFAIR_LOCK 32 32 18 5 20 20
FAIR_LOCK 31 5 ± 9 0.5 ± 0.3 0.26 0.24 0.23
Насколько	медленнее,	чем	unfair	lock?
На	два	порядка!
20
Бенчмарки, op/µs
Насколько	медленнее,	чем	unfair	lock?
На	два	порядка!
Страшно	ли	это?
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
SYNCHRONIZED 26 43 27 12 12 13
UNFAIR_LOCK 32 32 18 5 20 20
FAIR_LOCK 31 5 ± 9 0.5 ± 0.3 0.26 0.24 0.23
21
Как устроен типичный Core i7
CPU	4
CPU	0
CPU	5
CPU	1
CPU	6
CPU	2
CPU	7
CPU	3
L1	cache
L2	cache
L1	cache L1	cache L1	cache
L2	cache L2	cache L2	cache
L3	cache
Вывод	2:	честность	чего-то	стоит
Атомики и	CAS
24
Compare	and	Swap	— Hardware	Support
compare-and-swap
CAS
load-link / store-conditional
LL/SC
cmpxchg
ldrex/strex lwarx/stwcx
25
CAS Counter
public class CasLoopCounter implements Counter {
private AtomicLong value = new AtomicLong();
public long get() {
return value.get();
}
public void increment() {
for (;;) {
long oldValue = value.get();
long newValue = oldValue + 1;
if (value.compareAndSet(oldValue, newValue))
return;
}
}
}
26
Бенчмарки, op/µs
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
SYNCHRONIZED 26 43 27 12 12 13
UNFAIR_LOCK 32 32 18 5 20 20
CAS_LOOP
27
Бенчмарки, op/µs
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
SYNCHRONIZED 26 43 27 12 12 13
UNFAIR_LOCK 32 32 18 5 20 20
CAS_LOOP 62 62 45 10 6 5
28
Get-and-Add Counter
public class CasLoopCounter implements Counter {
private AtomicLong value = new AtomicLong();
public long get() {
return value.get();
}
public void increment() {
value.getAndAdd(1);
}
}
29
AtomicLong.getAndAdd()
30
Бенчмарки, op/µs
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
SYNCHRONIZED 26 43 27 12 12 13
UNFAIR_LOCK 32 32 18 5 20 20
CAS_LOOP 62 62 45 10 6 5
GET_AND_ADD 100 100 97 27 28 28
31
True Sharing
CPU	4
CPU	0
CPU	5
CPU	1
CPU	6
CPU	2
CPU	7
CPU	3
L1	cache
L2	cache
L1	cache L1	cache L1	cache
L2	cache L2	cache L2	cache
L3	cache
32
atomicLong.getAndAdd(5)
JDK	7u95	 JDK	8u72	
60
9 7 6
100
27 27 27
1 2 3 4
ops	/	μs
threads
33
atomicLong.getAndAdd(5)
JDK	7u95	 JDK	8u72	
60
9 7 6
100
27 27 27
1 2 3 4
ops	/	μs
threads
34
atomicLong.getAndAdd(5)
JDK	7u95	 JDK	8u72	
60
9 7 6
100
27 27 27
1 2 3 4
ops	/	μs
threads
35
loop:
mov 0x10(%rbx),%rax
mov %rax,%r11
add $0x5,%r11
lock cmpxchg %r11,0x10(%rbx)
sete %r11b
movzbl %r11b,%r11d
test %r10d,%r10d
je loop
JDK	7u95				-XX:+PrintAssembly
atomicLong.getAndAdd(5)
36
lock addq $0x5,0x10(%rbp))loop:
mov 0x10(%rbx),%rax
mov %rax,%r11
add $0x5,%r11
lock cmpxchg %r11,0x10(%rbx)
sete %r11b
movzbl %r11b,%r11d
test %r10d,%r10d
je loop
JDK	7u95				-XX:+PrintAssembly JDK	8u72 -XX:+PrintAssembly
atomicLong.getAndAdd(5)
JDK	7u95	 JDK	8u72	
60
9 7 6
100
27 27 27
1 2 3 4
ops	/	μs
threads
37 AtomicLong.getAndAdd()	— JDK	7
38 AtomicLong.getAndAdd()	— JDK	7
cmpxchg
39
AtomicLong.getAndAdd()	— JDK	8
40
AtomicLong.getAndAdd()	— JDK	8
lock addq
JVM	
Intrinsic
Вывод	3:	 не	верьте	всему,	что	написано	
в	исходниках	OpenJDK
JDK	8
43
StampedLock Counter
public class StampedLockCounter implements Counter {
private long value = 0;
private StampedLock lock = new StampedLock();
public long get() { ... }
public void add() {
long stamp = lock.writeLock();
try {
value++;
} finally{
lock.unlock(stamp);
}
}
}
44
Бенчмарки, op/µs
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
SYNCHRONIZED 26 43 27 12 12 13
UNFAIR_LOCK 32 32 18 5 20 20
CAS_LOOP 62 62 45 10 6 5
GET_AND_ADD 100 100 97 27 28 28
STAMPED_LOCK 31 31 24 5 22 21
45
Long Adder Counter
public class LongAdderCounter implements Counter {
private LongAdder value = new LongAdder();
public long get() {
return value.longValue();
}
public void increment() {
value.add(1);
}
}
46
Бенчмарки, op/µs
1 thread 2 threads 2 threads 2 threads4 threads8 threads
Core 0 Core 0 Cores 0,4 Cores 0,1 Cores 0-3 Cores 0-7
SYNCHRONIZED 26 43 27 12 12 13
UNFAIR_LOCK 32 32 18 5 20 20
CAS_LOOP 62 62 45 10 6 5
GET_AND_ADD 100 100 97 27 28 28
STAMPED_LOCK 31 31 24 5 22 21
LONG_ADDER 62 62 85 124 248 340
47
Литература
48
Материалы
• Все-все-все	— bit.ly/concurrency-interest
• Nitsan Wakart — psy-lob-saw.blogspot.com
• Алексей	Шипилёв — shipilev.net
Вопросы	и	ответы

More Related Content

What's hot

Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!Michael Barker
 
Csw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemesCsw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemes
CanSecWest
 
Non-blocking Michael-Scott queue algorithm
Non-blocking Michael-Scott queue algorithmNon-blocking Michael-Scott queue algorithm
Non-blocking Michael-Scott queue algorithm
Alexey Fyodorov
 
Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
mattpodwysocki
 
Silicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsSilicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM Mechanics
Azul Systems, Inc.
 
Hibernate Import.Sql I18n
Hibernate Import.Sql I18nHibernate Import.Sql I18n
Hibernate Import.Sql I18nyifi2009
 
devday2012
devday2012devday2012
devday2012
Juan Lopes
 
Everything you wanted to know about Stack Traces and Heap Dumps
Everything you wanted to know about Stack Traces and Heap DumpsEverything you wanted to know about Stack Traces and Heap Dumps
Everything you wanted to know about Stack Traces and Heap Dumps
Andrei Pangin
 
The Art of JVM Profiling
The Art of JVM ProfilingThe Art of JVM Profiling
The Art of JVM Profiling
Andrei Pangin
 
Behind modern concurrency primitives
Behind modern concurrency primitivesBehind modern concurrency primitives
Behind modern concurrency primitives
Bartosz Sypytkowski
 
FreeRTOS Xilinx Vivado: Hello World!
FreeRTOS Xilinx Vivado: Hello World!FreeRTOS Xilinx Vivado: Hello World!
FreeRTOS Xilinx Vivado: Hello World!
Vincent Claes
 
Dynamo: Not Just For Datastores
Dynamo: Not Just For DatastoresDynamo: Not Just For Datastores
Dynamo: Not Just For Datastores
Susan Potter
 
Node.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitterNode.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitter
Simen Li
 
Jenkins 2を使った究極のpipeline ~ 明日もう一度来てください、本物のpipelineをお見せしますよ ~
Jenkins 2を使った究極のpipeline ~ 明日もう一度来てください、本物のpipelineをお見せしますよ ~Jenkins 2を使った究極のpipeline ~ 明日もう一度来てください、本物のpipelineをお見せしますよ ~
Jenkins 2を使った究極のpipeline ~ 明日もう一度来てください、本物のpipelineをお見せしますよ ~
ikikko
 
Is your profiler speaking the same language as you? -- Docklands JUG
Is your profiler speaking the same language as you? -- Docklands JUGIs your profiler speaking the same language as you? -- Docklands JUG
Is your profiler speaking the same language as you? -- Docklands JUG
Simon Maple
 
How NOT to write in Node.js
How NOT to write in Node.jsHow NOT to write in Node.js
How NOT to write in Node.js
Piotr Pelczar
 
Java9を迎えた今こそ!Java本格(再)入門
Java9を迎えた今こそ!Java本格(再)入門Java9を迎えた今こそ!Java本格(再)入門
Java9を迎えた今こそ!Java本格(再)入門
Takuya Okada
 
Ricon/West 2013: Adventures with Riak Pipe
Ricon/West 2013: Adventures with Riak PipeRicon/West 2013: Adventures with Riak Pipe
Ricon/West 2013: Adventures with Riak Pipe
Susan Potter
 
Akka.NET streams and reactive streams
Akka.NET streams and reactive streamsAkka.NET streams and reactive streams
Akka.NET streams and reactive streams
Bartosz Sypytkowski
 
Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Vert.X: Microservices Were Never So Easy (Clement Escoffier)Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Red Hat Developers
 

What's hot (20)

Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!Lock? We don't need no stinkin' locks!
Lock? We don't need no stinkin' locks!
 
Csw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemesCsw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemes
 
Non-blocking Michael-Scott queue algorithm
Non-blocking Michael-Scott queue algorithmNon-blocking Michael-Scott queue algorithm
Non-blocking Michael-Scott queue algorithm
 
Cascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the StreamsCascadia.js: Don't Cross the Streams
Cascadia.js: Don't Cross the Streams
 
Silicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM MechanicsSilicon Valley JUG: JVM Mechanics
Silicon Valley JUG: JVM Mechanics
 
Hibernate Import.Sql I18n
Hibernate Import.Sql I18nHibernate Import.Sql I18n
Hibernate Import.Sql I18n
 
devday2012
devday2012devday2012
devday2012
 
Everything you wanted to know about Stack Traces and Heap Dumps
Everything you wanted to know about Stack Traces and Heap DumpsEverything you wanted to know about Stack Traces and Heap Dumps
Everything you wanted to know about Stack Traces and Heap Dumps
 
The Art of JVM Profiling
The Art of JVM ProfilingThe Art of JVM Profiling
The Art of JVM Profiling
 
Behind modern concurrency primitives
Behind modern concurrency primitivesBehind modern concurrency primitives
Behind modern concurrency primitives
 
FreeRTOS Xilinx Vivado: Hello World!
FreeRTOS Xilinx Vivado: Hello World!FreeRTOS Xilinx Vivado: Hello World!
FreeRTOS Xilinx Vivado: Hello World!
 
Dynamo: Not Just For Datastores
Dynamo: Not Just For DatastoresDynamo: Not Just For Datastores
Dynamo: Not Just For Datastores
 
Node.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitterNode.js Event Loop & EventEmitter
Node.js Event Loop & EventEmitter
 
Jenkins 2を使った究極のpipeline ~ 明日もう一度来てください、本物のpipelineをお見せしますよ ~
Jenkins 2を使った究極のpipeline ~ 明日もう一度来てください、本物のpipelineをお見せしますよ ~Jenkins 2を使った究極のpipeline ~ 明日もう一度来てください、本物のpipelineをお見せしますよ ~
Jenkins 2を使った究極のpipeline ~ 明日もう一度来てください、本物のpipelineをお見せしますよ ~
 
Is your profiler speaking the same language as you? -- Docklands JUG
Is your profiler speaking the same language as you? -- Docklands JUGIs your profiler speaking the same language as you? -- Docklands JUG
Is your profiler speaking the same language as you? -- Docklands JUG
 
How NOT to write in Node.js
How NOT to write in Node.jsHow NOT to write in Node.js
How NOT to write in Node.js
 
Java9を迎えた今こそ!Java本格(再)入門
Java9を迎えた今こそ!Java本格(再)入門Java9を迎えた今こそ!Java本格(再)入門
Java9を迎えた今こそ!Java本格(再)入門
 
Ricon/West 2013: Adventures with Riak Pipe
Ricon/West 2013: Adventures with Riak PipeRicon/West 2013: Adventures with Riak Pipe
Ricon/West 2013: Adventures with Riak Pipe
 
Akka.NET streams and reactive streams
Akka.NET streams and reactive streamsAkka.NET streams and reactive streams
Akka.NET streams and reactive streams
 
Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Vert.X: Microservices Were Never So Easy (Clement Escoffier)Vert.X: Microservices Were Never So Easy (Clement Escoffier)
Vert.X: Microservices Were Never So Easy (Clement Escoffier)
 

Viewers also liked

Atomics, CAS and Nonblocking algorithms
Atomics, CAS and Nonblocking algorithmsAtomics, CAS and Nonblocking algorithms
Atomics, CAS and Nonblocking algorithms
Alexey Fyodorov
 
мифы о спарке
мифы о спарке мифы о спарке
мифы о спарке
Evgeny Borisov
 
Search and analyze your data with elasticsearch
Search and analyze your data with elasticsearchSearch and analyze your data with elasticsearch
Search and analyze your data with elasticsearch
Anton Udovychenko
 
Angular2 Development for Java developers
Angular2 Development for Java developersAngular2 Development for Java developers
Angular2 Development for Java developers
Yakov Fain
 
Hibernate, how the magic is really done
Hibernate, how the magic is really doneHibernate, how the magic is really done
Hibernate, how the magic is really done
Mikalai Alimenkou
 
JEEConf 2016. Effectiveness and code optimization in Java applications
JEEConf 2016. Effectiveness and code optimization in  Java applicationsJEEConf 2016. Effectiveness and code optimization in  Java applications
JEEConf 2016. Effectiveness and code optimization in Java applications
Strannik_2013
 

Viewers also liked (6)

Atomics, CAS and Nonblocking algorithms
Atomics, CAS and Nonblocking algorithmsAtomics, CAS and Nonblocking algorithms
Atomics, CAS and Nonblocking algorithms
 
мифы о спарке
мифы о спарке мифы о спарке
мифы о спарке
 
Search and analyze your data with elasticsearch
Search and analyze your data with elasticsearchSearch and analyze your data with elasticsearch
Search and analyze your data with elasticsearch
 
Angular2 Development for Java developers
Angular2 Development for Java developersAngular2 Development for Java developers
Angular2 Development for Java developers
 
Hibernate, how the magic is really done
Hibernate, how the magic is really doneHibernate, how the magic is really done
Hibernate, how the magic is really done
 
JEEConf 2016. Effectiveness and code optimization in Java applications
JEEConf 2016. Effectiveness and code optimization in  Java applicationsJEEConf 2016. Effectiveness and code optimization in  Java applications
JEEConf 2016. Effectiveness and code optimization in Java applications
 

Similar to Counter Wars (JEEConf 2016)

Locks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerLocks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael Barker
JAX London
 
Non-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need itNon-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need it
Alexey Fyodorov
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoinknight1128
 
00_Introduction to Java.ppt
00_Introduction to Java.ppt00_Introduction to Java.ppt
00_Introduction to Java.ppt
HongAnhNguyn285885
 
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
 Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at... Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
Big Data Spain
 
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
 
Scala to assembly
Scala to assemblyScala to assembly
Scala to assembly
Jarek Ratajski
 
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
PVS-Studio
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
NAVER D2
 
Checking the Cross-Platform Framework Cocos2d-x
Checking the Cross-Platform Framework Cocos2d-xChecking the Cross-Platform Framework Cocos2d-x
Checking the Cross-Platform Framework Cocos2d-x
Andrey Karpov
 
VLSI lab manual
VLSI lab manualVLSI lab manual
VLSI lab manual
VaniPrasad11
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
Dongmin Yu
 
Modern_Java_Workshop manjunath np hj slave
Modern_Java_Workshop manjunath np hj slaveModern_Java_Workshop manjunath np hj slave
Modern_Java_Workshop manjunath np hj slave
gangadharnp111
 
JavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for DummiesJavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for DummiesCharles Nutter
 
Lambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter LawreyLambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter Lawrey
JAXLondon_Conference
 
Java Performance Puzzlers
Java Performance PuzzlersJava Performance Puzzlers
Java Performance Puzzlers
Doug Hawkins
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
Mattias Karlsson
 
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningCarol McDonald
 
What is new in java 8 concurrency
What is new in java 8 concurrencyWhat is new in java 8 concurrency
What is new in java 8 concurrency
kshanth2101
 

Similar to Counter Wars (JEEConf 2016) (20)

Locks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael BarkerLocks? We Don't Need No Stinkin' Locks - Michael Barker
Locks? We Don't Need No Stinkin' Locks - Michael Barker
 
Non-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need itNon-blocking synchronization — what is it and why we (don't?) need it
Non-blocking synchronization — what is it and why we (don't?) need it
 
Jdk 7 4-forkjoin
Jdk 7 4-forkjoinJdk 7 4-forkjoin
Jdk 7 4-forkjoin
 
00_Introduction to Java.ppt
00_Introduction to Java.ppt00_Introduction to Java.ppt
00_Introduction to Java.ppt
 
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
 Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at... Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
Processing large-scale graphs with Google(TM) Pregel by MICHAEL HACKSTEIN at...
 
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?
 
Scala to assembly
Scala to assemblyScala to assembly
Scala to assembly
 
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
Analysis of Haiku Operating System (BeOS Family) by PVS-Studio. Part 2
 
[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기[245] presto 내부구조 파헤치기
[245] presto 내부구조 파헤치기
 
Checking the Cross-Platform Framework Cocos2d-x
Checking the Cross-Platform Framework Cocos2d-xChecking the Cross-Platform Framework Cocos2d-x
Checking the Cross-Platform Framework Cocos2d-x
 
VLSI lab manual
VLSI lab manualVLSI lab manual
VLSI lab manual
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
Modern_Java_Workshop manjunath np hj slave
Modern_Java_Workshop manjunath np hj slaveModern_Java_Workshop manjunath np hj slave
Modern_Java_Workshop manjunath np hj slave
 
JavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for DummiesJavaOne 2012 - JVM JIT for Dummies
JavaOne 2012 - JVM JIT for Dummies
 
Lambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter LawreyLambdas puzzler - Peter Lawrey
Lambdas puzzler - Peter Lawrey
 
Java Concurrency
Java ConcurrencyJava Concurrency
Java Concurrency
 
Java Performance Puzzlers
Java Performance PuzzlersJava Performance Puzzlers
Java Performance Puzzlers
 
Java 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from OredevJava 7 Whats New(), Whats Next() from Oredev
Java 7 Whats New(), Whats Next() from Oredev
 
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, TuningJava 5 6 Generics, Concurrency, Garbage Collection, Tuning
Java 5 6 Generics, Concurrency, Garbage Collection, Tuning
 
What is new in java 8 concurrency
What is new in java 8 concurrencyWhat is new in java 8 concurrency
What is new in java 8 concurrency
 

More from Alexey Fyodorov

How threads help each other
How threads help each otherHow threads help each other
How threads help each other
Alexey Fyodorov
 
Помоги ближнему, или Как потоки помогают друг другу
Помоги ближнему, или Как потоки помогают друг другуПомоги ближнему, или Как потоки помогают друг другу
Помоги ближнему, или Как потоки помогают друг другу
Alexey Fyodorov
 
Синхронизация без блокировок и СМС
Синхронизация без блокировок и СМССинхронизация без блокировок и СМС
Синхронизация без блокировок и СМС
Alexey Fyodorov
 
Unsafe: to be or to be removed?
Unsafe: to be or to be removed?Unsafe: to be or to be removed?
Unsafe: to be or to be removed?
Alexey Fyodorov
 
Общество Мертвых Потоков
Общество Мертвых ПотоковОбщество Мертвых Потоков
Общество Мертвых Потоков
Alexey Fyodorov
 
JDK: CPU, PSU, LU, FR — WTF?!
JDK: CPU, PSU, LU, FR — WTF?!JDK: CPU, PSU, LU, FR — WTF?!
JDK: CPU, PSU, LU, FR — WTF?!
Alexey Fyodorov
 
Java in Motion
Java in MotionJava in Motion
Java in Motion
Alexey Fyodorov
 
Java Platform Tradeoffs (Riga 2013)
Java Platform Tradeoffs (Riga 2013)Java Platform Tradeoffs (Riga 2013)
Java Platform Tradeoffs (Riga 2013)
Alexey Fyodorov
 
Java Platform Tradeoffs (CEE SECR 2013)
Java Platform Tradeoffs (CEE SECR 2013)Java Platform Tradeoffs (CEE SECR 2013)
Java Platform Tradeoffs (CEE SECR 2013)
Alexey Fyodorov
 
Процесс изменения платформы Java
Процесс изменения платформы JavaПроцесс изменения платформы Java
Процесс изменения платформы Java
Alexey Fyodorov
 
Java: how to thrive in the changing world
Java: how to thrive in the changing worldJava: how to thrive in the changing world
Java: how to thrive in the changing worldAlexey Fyodorov
 

More from Alexey Fyodorov (12)

How threads help each other
How threads help each otherHow threads help each other
How threads help each other
 
Помоги ближнему, или Как потоки помогают друг другу
Помоги ближнему, или Как потоки помогают друг другуПомоги ближнему, или Как потоки помогают друг другу
Помоги ближнему, или Как потоки помогают друг другу
 
Синхронизация без блокировок и СМС
Синхронизация без блокировок и СМССинхронизация без блокировок и СМС
Синхронизация без блокировок и СМС
 
Unsafe: to be or to be removed?
Unsafe: to be or to be removed?Unsafe: to be or to be removed?
Unsafe: to be or to be removed?
 
Общество Мертвых Потоков
Общество Мертвых ПотоковОбщество Мертвых Потоков
Общество Мертвых Потоков
 
JDK: CPU, PSU, LU, FR — WTF?!
JDK: CPU, PSU, LU, FR — WTF?!JDK: CPU, PSU, LU, FR — WTF?!
JDK: CPU, PSU, LU, FR — WTF?!
 
Philosophers
PhilosophersPhilosophers
Philosophers
 
Java in Motion
Java in MotionJava in Motion
Java in Motion
 
Java Platform Tradeoffs (Riga 2013)
Java Platform Tradeoffs (Riga 2013)Java Platform Tradeoffs (Riga 2013)
Java Platform Tradeoffs (Riga 2013)
 
Java Platform Tradeoffs (CEE SECR 2013)
Java Platform Tradeoffs (CEE SECR 2013)Java Platform Tradeoffs (CEE SECR 2013)
Java Platform Tradeoffs (CEE SECR 2013)
 
Процесс изменения платформы Java
Процесс изменения платформы JavaПроцесс изменения платформы Java
Процесс изменения платформы Java
 
Java: how to thrive in the changing world
Java: how to thrive in the changing worldJava: how to thrive in the changing world
Java: how to thrive in the changing world
 

Recently uploaded

Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
manasideore6
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
ydteq
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
top1002
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
veerababupersonal22
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
symbo111
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
SyedAbiiAzazi1
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
WENKENLI1
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
Amil Baba Dawood bangali
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
gerogepatton
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
Aditya Rajan Patra
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
AmarGB2
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 

Recently uploaded (20)

Fundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptxFundamentals of Electric Drives and its applications.pptx
Fundamentals of Electric Drives and its applications.pptx
 
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
一比一原版(UofT毕业证)多伦多大学毕业证成绩单如何办理
 
Basic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparelBasic Industrial Engineering terms for apparel
Basic Industrial Engineering terms for apparel
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERSCW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
CW RADAR, FMCW RADAR, FMCW ALTIMETER, AND THEIR PARAMETERS
 
Building Electrical System Design & Installation
Building Electrical System Design & InstallationBuilding Electrical System Design & Installation
Building Electrical System Design & Installation
 
14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application14 Template Contractual Notice - EOT Application
14 Template Contractual Notice - EOT Application
 
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdfGoverning Equations for Fundamental Aerodynamics_Anderson2010.pdf
Governing Equations for Fundamental Aerodynamics_Anderson2010.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Immunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary AttacksImmunizing Image Classifiers Against Localized Adversary Attacks
Immunizing Image Classifiers Against Localized Adversary Attacks
 
Recycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part IIIRecycled Concrete Aggregate in Construction Part III
Recycled Concrete Aggregate in Construction Part III
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Investor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptxInvestor-Presentation-Q1FY2024 investor presentation document.pptx
Investor-Presentation-Q1FY2024 investor presentation document.pptx
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 

Counter Wars (JEEConf 2016)