Duke CPS 108 33. 1 Java: make it run, make it right, make it fast (see Byte, May 1998, for more details) l “Java isn’t fast enough for ‘real’ applications”

Slides:



Advertisements
Similar presentations
Introduction to Java 2 Programming Lecture 3 Writing Java Applications, Java Development Tools.
Advertisements

1 Copyright © 2005, Oracle. All rights reserved. Introducing the Java and Oracle Platforms.
Software Design 8.1 XML and XSLT and other TLA's l XML: more than buzzword compliancy  Future of information interchange  Leverages Internet and TCP/IP.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
JAVA Processors and JIT Scheduling. Overview & Literature n Formulation of the problem n JAVA introduction n Description of Caffeine * Literature: “Java.
Lab#1 (14/3/1431h) Introduction To java programming cs425
got ? Research Project – April 1998 Hang Xia, Mark Wang, Richard S. Chang Updated: R Norman, August 1999.
1 Java Basics. 2 Compiling A “compiler” is a program that translates from one language to another Typically from easy-to-read to fast-to-run e.g. from.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
JDK, Jan Pettersen Nytun - HiA 1 The Java Programming Environment: The programmer write source code with a text editor. The programmer write source code.
Aarhus University, 2005Esmertec AG1 Implementing Object-Oriented Virtual Machines Lars Bak & Kasper Lund Esmertec AG
Revealing the CLR 4.0 Internals Svetlin Nakov Telerik Corporation
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
JVM-1 Introduction to Java Virtual Machine. JVM-2 Outline Java Language, Java Virtual Machine and Java Platform Organization of Java Virtual Machine Garbage.
Table 1. Software Hierarchy Levels.. Essential Tools An assembler is a program that converts source-code programs into a machine language (object file).
Development of Computer - Story of Steve. What is a computer A high intelligence machine A tool – make our life much convenient A very loyal servant Pretty.
CS884 (Prasad)Java Goals1 “Perfect Quote” You know you've achieved perfection in design, Not when you have nothing more to add, But when you have nothing.
Toba Gregg M. Townsend Executable Code from Java Source.
1 Software Testing and Quality Assurance Lecture 31 – SWE 205 Course Objective: Basics of Programming Languages & Software Construction Techniques.
Load Time Structural Reflection in Java Shigeru Chiba Institute of Information Science and Electronics University of Tsukuba.
3-1 3 Compilers and interpreters  Compilers and other translators  Interpreters  Tombstone diagrams  Real vs virtual machines  Interpretive compilers.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
Source Code Basics. Code For a computer to execute instructions, it needs to be in binary Each instruction is given a number Known as “operation code”
Introduction to Java Programming. Contents 1. Java, etc. 2. Java's Advantages 3. Java's Disadvantages 4. Types of Java Code 5. Java Bytecodes 6. Steps.
Intro to Java The Java Virtual Machine. What is the JVM  a software emulation of a hypothetical computing machine that runs Java bytecodes (Java compiler.
Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.
Java Introduction 劉登榮 Deng-Rung Liu 87/7/15. Outline 4 History 4 Why Java? 4 Java Concept 4 Java in Real World 4 Language Overview 4 Java Performance!?
Adaptive Optimization in the Jalapeño JVM M. Arnold, S. Fink, D. Grove, M. Hind, P. Sweeney Presented by Andrew Cove Spring 2006.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
Introduction to Java Appendix A. Appendix A: Introduction to Java2 Chapter Objectives To understand the essentials of object-oriented programming in Java.
CSC 8505 Compiler Construction IR Example: Java Bytecode (looking inside class files)
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
M1G Introduction to Programming 2 4. Enhancing a class:Room.
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
1 Comp 104: Operating Systems Concepts Java Development and Run-Time Store Organisation.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Java Virtual Machine Case Study on the Design of JikesRVM.
Copyright © 2007 Addison-Wesley. All rights reserved.1-1 Reasons for Studying Concepts of Programming Languages Increased ability to express ideas Improved.
Conrad Benham Java Opcode and Runtime Data Analysis By: Conrad Benham Supervisor: Professor Arthur Sale.
C# Versus Java Author: Eaddy, Marc Source: Software Tools for the Professional Programmer. Dr. Dobb's Journal. Feb2001, Vol. 26 Issue 2, p74 Hong Lu CS699A.
Lecture 8 February 29, Topics Questions about Exercise 4, due Thursday? Object Based Programming (Chapter 8) –Basic Principles –Methods –Fields.
What Is Java? According to Sun in a white paper: Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable,
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
Virtual Machines, Interpretation Techniques, and Just-In-Time Compilers Kostis Sagonas
U NIVERSITY OF D ELAWARE C OMPUTER & I NFORMATION S CIENCES D EPARTMENT Optimizing Compilers CISC 673 Spring 2009 Dynamic Compilation I John Cavazos University.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
Garbage Collection and Classloading Java Garbage Collectors  Eden Space  Surviver Space  Tenured Gen  Perm Gen  Garbage Collection Notes Classloading.
Java Basics Opening Discussion zWhat did we talk about last class? zWhat are the basic constructs in the programming languages you are familiar.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
CSE 598c – Virtual Machines Survey Proposal: Improving Performance for the JVM Sandra Rueda.
Object Oriented Software Development 4. C# data types, objects and references.
By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual.
Duke CPS From C++ to Java l Java history: Oak, toaster-ovens, internet language, panacea l What it is ä O-O language, not a hybrid (cf. C++)
Software Development Introduction
Vertical Profiling : Understanding the Behavior of Object-Oriented Applications Sookmyung Women’s Univ. PsLab Sewon,Moon.
Introduction to Programming 1 1 2Introduction to Java.
Programming 2 Intro to Java Machine code Assembly languages Fortran Basic Pascal Scheme CC++ Java LISP Smalltalk Smalltalk-80.
RealTimeSystems Lab Jong-Koo, Lim
JAVA TRAINING IN NOIDA. JAVA Java is a general-purpose computer programming language that is concurrent, class-based, object-oriented and specifically.
1 Sections Java Virtual Machine and Byte Code Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
1 Problem Solving  The purpose of writing a program is to solve a problem  The general steps in problem solving are: Understand the problem Dissect the.
Topic: Difference b/w JDK, JRE, JIT, JVM
Runtime Analysis of Hotspot Java Virtual Machine
Java Virtual Machine Complete subject details are available at:
Java for IOI.
(Computer fundamental Lab)
Java Programming Introduction
Presentation transcript:

Duke CPS Java: make it run, make it right, make it fast (see Byte, May 1998, for more details) l “Java isn’t fast enough for ‘real’ applications” --- J. Generic ä Moore’s law: hardware speeds double every 18 months ä What’s the analagous law for software? l Java:.java to.class to JVM to executing code, where is there room to make this faster? ä Source to bytecode optimizers, currently primitive given state-of-the art compiler technology e.g., in C++ compilers ä bytecode: post compilation re-ordering and optimizing ä better JVMs, better garbage collection, thread management Sun/Microsoft generational garbage collection: “most objects die young

Duke CPS Java: making it fast (continued) l JIT: just-in-time compiling ä as Java class files are loaded, they are compiled to native (platform-specific) code and cached for continued fast execution (Netscape and Symantec’s JIT) ä non-JIT JVM: 50% of time executing bytecode (what else?) l Dynamic/Adaptive compilation ä Sun: HotSpot, compile bytecode to native code at run time based on execution profiles l Java Chips ä execute bytecode at the machine level

Duke CPS Java: make it fast by smart/better programming l Strings are really slow ä use StringBuffer or char array (when you know there’s a bottleneck). String concatenation is egregiously slow: convert to buffer, join, convert back l Use a good ClassLoader, e.g., JBuilder (Borland) is faster than Sun’s loader l Avoid temporary objects, lots of work for garbage collector l Use static initialization when appropriate, e.g., as a replacement for some parts of a constructor l Use JFC instead of AWT, better thread management, no peers l Profile your code, don’t guess

Duke CPS CPS 108 l On becoming an object-oriented programmer and designer ä C++, Java, similarities and differences ä Using inheritance wisely, knowing about design patterns ä conventions, e.g., UML, design methodologies l More knowledge of C++ and it’s C core ä some low level details, knowing what to expect in a C program l Knowledge of Java ä comparison to C++, which language will you turn to? l Working in teams/groups on bigger programs ä managing teams, working together, using tools like CVS l The software process ä how to make good programs, how to deliver good products