SlideShare ist ein Scribd-Unternehmen logo
1 von 16
COMPILER IN
JAVA
complier java use and effect on
performance
San Jose State University
Computer Science Department
2014 Fall
Kaya Ota
AGENDA
 First of all CPU
 Java attempt to do
 Kinds of compilers
 The difference of each complier
 The reasons why Java has multiple compliers
FIRST OF ALL
 Any computer (CPU) can execute only assembly or binary code
 As well known, all programs must be translated into binary code.
CPU
Assembly or
binary
Java, python, c,
English,
Japanese, etc
WHAT JAVA ATTEMPT TO….
 Compiled Language
 Benefit : once source code
is translated to binary, it does
not have to re-translate. So,
it will be faster than an
interpreted language.
 Downside : compiled
languages are tightly coupled
with CPU. So, programs do
not have a portability.
 Interpreted Language
 Benefit : if a computer has a
appropriate interpreter, then
programs can run on the
machine. (it is portable.)
 Downside : an interpreter
translate each line one by
one, so it need to translate
again and again. Therefore, it
is slower than complied
language.
Java tries to have portability AND speed
of compiled language.
COMPILE ONCE & RUN
EVERYWHERE
 To be independent from CPU and OS, java make the process of
compilation into two steps.
 1st step : Source Code  intermediate code (= .class)
 So, only on JVM, an intermediate code is executable
 2nd step : intermediate code  binary
 This is still dependent on CPU and OS.
PROGRAM AT COMPILER TIME AND AT
EXECUTION TIME
SRC
.java
Java compiler
(javac [.java
file])
Java
byte
code
.class
Class loader
Byte code verifier
Byte code
source
through
new or file
system
JVM JIT
OS
hardware
1st step compiler
static compiling
2nd step compiler
dynamic
compiling
JAVA HAS MULTIPLE KINDS OF
COMPLIER
 Different applications have different needs.
 Long run enterprise application allows more optimizations.
 Smaller client-side application needs fast execution with less resource consumption.
 Client Compiler
 Server Compiler
 Tired Compilation
The primary difference between client compiler and server complier is their
aggressiveness in compiling code
DIFFERENCE BETWEEN
CLIENT AND SERVER
footPrint
(memory
usage)
Running time Warming up
time
Client
Server
Time interval between
download and
activation of an
application once
CLIENT
 The primary objective of the client compiler is “fast start up.”
 The client complier begins compiling sooner than server complier
does.
 During the beginning of execution, the client compiler will be
faster
 Because the client compiler compiles more code correspondingly
Usually client has a fewer
memory, so client compiler is
optimized in memory usage as
shown in a previous table.
SERVER
 Server side applications are expected to run in a long period of
time.
 Instead of using more resources,( such as CPU cycles, larger
code cache, etc) these applications delivers more advanced
optimizations for later in running cycle.
TIERED COMPILATION
 Tiered compilation combines the best parts of client side
compilation and server side compilation.
 Tiered compilation gather data during low-impact compiler activity.
 To apply more advanced optimizations later, the compiler can use
the data.
DEFAULT SETTING OF COMPILERS
Windows Mac
CHANGE YOUR COMPILER
 Windows
 Installer x86 for 32bit machine
 Java option: -client or –server (default client )
 Installer x64 for 64bit machine
 Java option: -hotspot or –server (default server)
 Mac 64 bit ---only for –server
HOT SPOT COMPLICATION
 Hot spots of application : the more the section of the code is
executed. the hotter that section is said to be.
 Typically, some subset of codes are executed frequently.
 And, a performance of an application depends on the frequently
executed codes.
 So, java starts running an application with interpreter like and
determine which chunks of codes are invoked frequently
 Then, java decides to compile those chunks of codes(no longer
translate them again!)
 Benefit : by avoiding infrequently invoked codes, java complier can
focus on the performance-critical-parts, without necessarily
increasing the overall compilation time
EXAMPLE OF HOT SPOT
 Priority Queue
 insert(int newItem)
 delete(int position)
 increaseKey(int posi, int delta)
 decreaseKey(int posi, int delta)
 shiftUp(int position)
 shiftDown(int position)
Those functions call shiftUp
or shiftDown somewhere in
their procedure .
Therefore, shiftUp and
shiftDown are said to be
hotter than other
functions.
REFERENCE
 JVM performance optimization
 http://www.javaworld.com/article/2078635/enterprise-middleware/jvm-performance-
optimization-part-2-compilers.html
 Java Performance : The Definitive Guide by Scott Oaks
 Why Java Is Better Then Other Programming Language And Byte
Code Concept
 http://codemink.com/why-java-is-better-byte-code-concept/

Weitere ähnliche Inhalte

Was ist angesagt?

Apache Big Data Europe 2016
Apache Big Data Europe 2016Apache Big Data Europe 2016
Apache Big Data Europe 2016Tim Ellison
 
Java introduction with JVM architecture
Java introduction with JVM architectureJava introduction with JVM architecture
Java introduction with JVM architectureatozknowledge .com
 
Eclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesEclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesMark Stoodley
 
White and Black Magic on the JVM
White and Black Magic on the JVMWhite and Black Magic on the JVM
White and Black Magic on the JVMIvaylo Pashov
 
OpenPOWER Application Optimization
OpenPOWER Application Optimization OpenPOWER Application Optimization
OpenPOWER Application Optimization Ganesan Narayanasamy
 
Java byte code presentation
Java byte code presentationJava byte code presentation
Java byte code presentationMahnoor Hashmi
 
Advanced java-training-in-bangalore
Advanced java-training-in-bangaloreAdvanced java-training-in-bangalore
Advanced java-training-in-bangaloresiyaram ray
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVMAlex Birch
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvmhome
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machineNikhil Sharma
 
Ijaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinderIjaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinderijaprr_editor
 
The features of java 11 vs. java 12
The features of  java 11 vs. java 12The features of  java 11 vs. java 12
The features of java 11 vs. java 12FarjanaAhmed3
 

Was ist angesagt? (20)

Apache Big Data Europe 2016
Apache Big Data Europe 2016Apache Big Data Europe 2016
Apache Big Data Europe 2016
 
Java introduction with JVM architecture
Java introduction with JVM architectureJava introduction with JVM architecture
Java introduction with JVM architecture
 
Jvm Architecture
Jvm ArchitectureJvm Architecture
Jvm Architecture
 
Eclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimesEclipse OMR: a modern toolkit for building language runtimes
Eclipse OMR: a modern toolkit for building language runtimes
 
White and Black Magic on the JVM
White and Black Magic on the JVMWhite and Black Magic on the JVM
White and Black Magic on the JVM
 
JVM++: The Graal VM
JVM++: The Graal VMJVM++: The Graal VM
JVM++: The Graal VM
 
OpenPOWER Application Optimization
OpenPOWER Application Optimization OpenPOWER Application Optimization
OpenPOWER Application Optimization
 
Java byte code presentation
Java byte code presentationJava byte code presentation
Java byte code presentation
 
Byte code jvm
Byte code jvmByte code jvm
Byte code jvm
 
Advanced java-training-in-bangalore
Advanced java-training-in-bangaloreAdvanced java-training-in-bangalore
Advanced java-training-in-bangalore
 
A tour of Java and the JVM
A tour of Java and the JVMA tour of Java and the JVM
A tour of Java and the JVM
 
Architecture diagram of jvm
Architecture diagram of jvmArchitecture diagram of jvm
Architecture diagram of jvm
 
Java Virtual Machine
Java Virtual MachineJava Virtual Machine
Java Virtual Machine
 
Lec1 final
Lec1 finalLec1 final
Lec1 final
 
Programming
ProgrammingProgramming
Programming
 
Vliw
VliwVliw
Vliw
 
Java virtual machine
Java virtual machineJava virtual machine
Java virtual machine
 
Ijaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinderIjaprr vol1-2-13-60-64tejinder
Ijaprr vol1-2-13-60-64tejinder
 
The features of java 11 vs. java 12
The features of  java 11 vs. java 12The features of  java 11 vs. java 12
The features of java 11 vs. java 12
 
Java JVM
Java JVMJava JVM
Java JVM
 

Andere mochten auch

JVM JIT-compiler overview @ JavaOne Moscow 2013
JVM JIT-compiler overview @ JavaOne Moscow 2013JVM JIT-compiler overview @ JavaOne Moscow 2013
JVM JIT-compiler overview @ JavaOne Moscow 2013Vladimir Ivanov
 
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, UkraineVladimir Ivanov
 
Candy crush saga
Candy crush sagaCandy crush saga
Candy crush sagatavikeith
 
20130720 case study of candy crush saga
20130720 case study of candy crush saga20130720 case study of candy crush saga
20130720 case study of candy crush sagaChristina Hsu
 
AI based Tic Tac Toe game using Minimax Algorithm
AI based Tic Tac Toe game using Minimax AlgorithmAI based Tic Tac Toe game using Minimax Algorithm
AI based Tic Tac Toe game using Minimax AlgorithmKiran Shahi
 
TIC TAC TOE
TIC TAC TOETIC TAC TOE
TIC TAC TOEasmhemu
 
Candy crush cheat codes: 10 Cheat Codes of candy crush saga
Candy crush cheat codes: 10 Cheat Codes of candy crush sagaCandy crush cheat codes: 10 Cheat Codes of candy crush saga
Candy crush cheat codes: 10 Cheat Codes of candy crush sagaMeddy Lee
 
King’s candy crush saga
King’s candy crush sagaKing’s candy crush saga
King’s candy crush sagaCaleb Yoon
 
Attacks in MANET
Attacks in MANETAttacks in MANET
Attacks in MANETSunita Sahu
 
Tic tac toe c++ project presentation
Tic tac toe c++ project presentationTic tac toe c++ project presentation
Tic tac toe c++ project presentationSaad Symbian
 
Just in time manufacturing ppt
Just in time manufacturing pptJust in time manufacturing ppt
Just in time manufacturing pptSwati Luthra
 

Andere mochten auch (13)

JVM JIT-compiler overview @ JavaOne Moscow 2013
JVM JIT-compiler overview @ JavaOne Moscow 2013JVM JIT-compiler overview @ JavaOne Moscow 2013
JVM JIT-compiler overview @ JavaOne Moscow 2013
 
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
"JIT compiler overview" @ JEEConf 2013, Kiev, Ukraine
 
Candy crush saga
Candy crush sagaCandy crush saga
Candy crush saga
 
20130720 case study of candy crush saga
20130720 case study of candy crush saga20130720 case study of candy crush saga
20130720 case study of candy crush saga
 
AI based Tic Tac Toe game using Minimax Algorithm
AI based Tic Tac Toe game using Minimax AlgorithmAI based Tic Tac Toe game using Minimax Algorithm
AI based Tic Tac Toe game using Minimax Algorithm
 
TIC TAC TOE
TIC TAC TOETIC TAC TOE
TIC TAC TOE
 
Candy crush cheat codes: 10 Cheat Codes of candy crush saga
Candy crush cheat codes: 10 Cheat Codes of candy crush sagaCandy crush cheat codes: 10 Cheat Codes of candy crush saga
Candy crush cheat codes: 10 Cheat Codes of candy crush saga
 
King’s candy crush saga
King’s candy crush sagaKing’s candy crush saga
King’s candy crush saga
 
Attacks in MANET
Attacks in MANETAttacks in MANET
Attacks in MANET
 
Tic tac toe c++ project presentation
Tic tac toe c++ project presentationTic tac toe c++ project presentation
Tic tac toe c++ project presentation
 
Just In Time (JIT) Systems
Just In Time (JIT) SystemsJust In Time (JIT) Systems
Just In Time (JIT) Systems
 
Just in time manufacturing ppt
Just in time manufacturing pptJust in time manufacturing ppt
Just in time manufacturing ppt
 
Just In Time
Just In TimeJust In Time
Just In Time
 

Ähnlich wie Jit complier

Java performance tuning
Java performance tuningJava performance tuning
Java performance tuningJerry Kurian
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpretersRAJU KATHI
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Md Hossen
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkMohit Belwal
 
J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01Jay Palit
 
Passes of Compiler.pptx
Passes of Compiler.pptxPasses of Compiler.pptx
Passes of Compiler.pptxSanjay Singh
 
Sybsc cs sem 3 core java
Sybsc cs sem 3 core javaSybsc cs sem 3 core java
Sybsc cs sem 3 core javaWE-IT TUTORIALS
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Mr. Akaash
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution pptKeerty Smile
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technologysshhzap
 
Advanced java training in bangalore
Advanced java training in bangaloreAdvanced java training in bangalore
Advanced java training in bangaloresiyaram ray
 

Ähnlich wie Jit complier (20)

Java performance tuning
Java performance tuningJava performance tuning
Java performance tuning
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpreters
 
Java unit 1
Java unit 1Java unit 1
Java unit 1
 
00 intro to java
00 intro to java00 intro to java
00 intro to java
 
Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.Compiler vs Interpreter-Compiler design ppt.
Compiler vs Interpreter-Compiler design ppt.
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
JAVA Program Examples
JAVA Program ExamplesJAVA Program Examples
JAVA Program Examples
 
java intro.pptx
java intro.pptxjava intro.pptx
java intro.pptx
 
J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01J2ee strutswithhibernate-140121221332-phpapp01
J2ee strutswithhibernate-140121221332-phpapp01
 
Passes of Compiler.pptx
Passes of Compiler.pptxPasses of Compiler.pptx
Passes of Compiler.pptx
 
Sybsc cs sem 3 core java
Sybsc cs sem 3 core javaSybsc cs sem 3 core java
Sybsc cs sem 3 core java
 
Srgoc java
Srgoc javaSrgoc java
Srgoc java
 
Chapter1.pdf
Chapter1.pdfChapter1.pdf
Chapter1.pdf
 
Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...Introduction to Java Programming, Basic Structure, variables Data type, input...
Introduction to Java Programming, Basic Structure, variables Data type, input...
 
Codename one
Codename oneCodename one
Codename one
 
JAVA for Every one
JAVA for Every oneJAVA for Every one
JAVA for Every one
 
Java introduction
Java introductionJava introduction
Java introduction
 
Insight into progam execution ppt
Insight into progam execution pptInsight into progam execution ppt
Insight into progam execution ppt
 
Chapter 1 introduction to java technology
Chapter 1 introduction to java technologyChapter 1 introduction to java technology
Chapter 1 introduction to java technology
 
Advanced java training in bangalore
Advanced java training in bangaloreAdvanced java training in bangalore
Advanced java training in bangalore
 

Mehr von Kaya Ota

Solr 勉強会 20191028
Solr 勉強会 20191028Solr 勉強会 20191028
Solr 勉強会 20191028Kaya Ota
 
Privacy statement
Privacy statementPrivacy statement
Privacy statementKaya Ota
 
CS166 Final project
CS166 Final projectCS166 Final project
CS166 Final projectKaya Ota
 
Cs166 mynote
Cs166 mynoteCs166 mynote
Cs166 mynoteKaya Ota
 
Edited keeping happiness
Edited keeping happinessEdited keeping happiness
Edited keeping happinessKaya Ota
 
Database Management System Review
Database Management System ReviewDatabase Management System Review
Database Management System ReviewKaya Ota
 
javascript
javascript javascript
javascript Kaya Ota
 
Math178 hw7
Math178 hw7Math178 hw7
Math178 hw7Kaya Ota
 
CS152 Programming Paradigm
CS152 Programming Paradigm CS152 Programming Paradigm
CS152 Programming Paradigm Kaya Ota
 
Umap traversabilityin graph
Umap traversabilityin graphUmap traversabilityin graph
Umap traversabilityin graphKaya Ota
 
Price Distribution and Consumer Surplus
Price Distribution and Consumer Surplus Price Distribution and Consumer Surplus
Price Distribution and Consumer Surplus Kaya Ota
 
Midterm review for CS156
Midterm review for CS156Midterm review for CS156
Midterm review for CS156Kaya Ota
 
Methodologies of Software Engineering
Methodologies of Software EngineeringMethodologies of Software Engineering
Methodologies of Software EngineeringKaya Ota
 

Mehr von Kaya Ota (14)

Solr 勉強会 20191028
Solr 勉強会 20191028Solr 勉強会 20191028
Solr 勉強会 20191028
 
Privacy statement
Privacy statementPrivacy statement
Privacy statement
 
CS166 Final project
CS166 Final projectCS166 Final project
CS166 Final project
 
Cs166 mynote
Cs166 mynoteCs166 mynote
Cs166 mynote
 
Cs166 hw1
Cs166 hw1Cs166 hw1
Cs166 hw1
 
Edited keeping happiness
Edited keeping happinessEdited keeping happiness
Edited keeping happiness
 
Database Management System Review
Database Management System ReviewDatabase Management System Review
Database Management System Review
 
javascript
javascript javascript
javascript
 
Math178 hw7
Math178 hw7Math178 hw7
Math178 hw7
 
CS152 Programming Paradigm
CS152 Programming Paradigm CS152 Programming Paradigm
CS152 Programming Paradigm
 
Umap traversabilityin graph
Umap traversabilityin graphUmap traversabilityin graph
Umap traversabilityin graph
 
Price Distribution and Consumer Surplus
Price Distribution and Consumer Surplus Price Distribution and Consumer Surplus
Price Distribution and Consumer Surplus
 
Midterm review for CS156
Midterm review for CS156Midterm review for CS156
Midterm review for CS156
 
Methodologies of Software Engineering
Methodologies of Software EngineeringMethodologies of Software Engineering
Methodologies of Software Engineering
 

Kürzlich hochgeladen

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Kürzlich hochgeladen (20)

Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Jit complier

  • 1. COMPILER IN JAVA complier java use and effect on performance San Jose State University Computer Science Department 2014 Fall Kaya Ota
  • 2. AGENDA  First of all CPU  Java attempt to do  Kinds of compilers  The difference of each complier  The reasons why Java has multiple compliers
  • 3. FIRST OF ALL  Any computer (CPU) can execute only assembly or binary code  As well known, all programs must be translated into binary code. CPU Assembly or binary Java, python, c, English, Japanese, etc
  • 4. WHAT JAVA ATTEMPT TO….  Compiled Language  Benefit : once source code is translated to binary, it does not have to re-translate. So, it will be faster than an interpreted language.  Downside : compiled languages are tightly coupled with CPU. So, programs do not have a portability.  Interpreted Language  Benefit : if a computer has a appropriate interpreter, then programs can run on the machine. (it is portable.)  Downside : an interpreter translate each line one by one, so it need to translate again and again. Therefore, it is slower than complied language. Java tries to have portability AND speed of compiled language.
  • 5. COMPILE ONCE & RUN EVERYWHERE  To be independent from CPU and OS, java make the process of compilation into two steps.  1st step : Source Code  intermediate code (= .class)  So, only on JVM, an intermediate code is executable  2nd step : intermediate code  binary  This is still dependent on CPU and OS.
  • 6. PROGRAM AT COMPILER TIME AND AT EXECUTION TIME SRC .java Java compiler (javac [.java file]) Java byte code .class Class loader Byte code verifier Byte code source through new or file system JVM JIT OS hardware 1st step compiler static compiling 2nd step compiler dynamic compiling
  • 7. JAVA HAS MULTIPLE KINDS OF COMPLIER  Different applications have different needs.  Long run enterprise application allows more optimizations.  Smaller client-side application needs fast execution with less resource consumption.  Client Compiler  Server Compiler  Tired Compilation The primary difference between client compiler and server complier is their aggressiveness in compiling code
  • 8. DIFFERENCE BETWEEN CLIENT AND SERVER footPrint (memory usage) Running time Warming up time Client Server Time interval between download and activation of an application once
  • 9. CLIENT  The primary objective of the client compiler is “fast start up.”  The client complier begins compiling sooner than server complier does.  During the beginning of execution, the client compiler will be faster  Because the client compiler compiles more code correspondingly Usually client has a fewer memory, so client compiler is optimized in memory usage as shown in a previous table.
  • 10. SERVER  Server side applications are expected to run in a long period of time.  Instead of using more resources,( such as CPU cycles, larger code cache, etc) these applications delivers more advanced optimizations for later in running cycle.
  • 11. TIERED COMPILATION  Tiered compilation combines the best parts of client side compilation and server side compilation.  Tiered compilation gather data during low-impact compiler activity.  To apply more advanced optimizations later, the compiler can use the data.
  • 12. DEFAULT SETTING OF COMPILERS Windows Mac
  • 13. CHANGE YOUR COMPILER  Windows  Installer x86 for 32bit machine  Java option: -client or –server (default client )  Installer x64 for 64bit machine  Java option: -hotspot or –server (default server)  Mac 64 bit ---only for –server
  • 14. HOT SPOT COMPLICATION  Hot spots of application : the more the section of the code is executed. the hotter that section is said to be.  Typically, some subset of codes are executed frequently.  And, a performance of an application depends on the frequently executed codes.  So, java starts running an application with interpreter like and determine which chunks of codes are invoked frequently  Then, java decides to compile those chunks of codes(no longer translate them again!)  Benefit : by avoiding infrequently invoked codes, java complier can focus on the performance-critical-parts, without necessarily increasing the overall compilation time
  • 15. EXAMPLE OF HOT SPOT  Priority Queue  insert(int newItem)  delete(int position)  increaseKey(int posi, int delta)  decreaseKey(int posi, int delta)  shiftUp(int position)  shiftDown(int position) Those functions call shiftUp or shiftDown somewhere in their procedure . Therefore, shiftUp and shiftDown are said to be hotter than other functions.
  • 16. REFERENCE  JVM performance optimization  http://www.javaworld.com/article/2078635/enterprise-middleware/jvm-performance- optimization-part-2-compilers.html  Java Performance : The Definitive Guide by Scott Oaks  Why Java Is Better Then Other Programming Language And Byte Code Concept  http://codemink.com/why-java-is-better-byte-code-concept/