Pitfalls of Object Oriented Programming

Size: px
Start display at page:

Download "Pitfalls of Object Oriented Programming"

Transcription

1 Sony Computer Entertainment Europe Research & Development Division Pitfalls of Object Oriented Programming Tony Albrecht Technical Consultant Developer Services

2 A quick look at Object Oriented (OO) programming A common example Optimisation of that example Summary What I will be covering Slide 2

3 Object Oriented (OO) Programming What is OO programming? a programming paradigm that uses "objects" data structures consisting of datafields and methods together with their interactions to design applications and computer programs. (Wikipedia) Includes features such as Data abstraction Encapsulation Polymorphism Inheritance Slide 3

4 What s OOP for? OO programming allows you to think about problems in terms of objects and their interactions. Each object is (ideally) self contained Contains its own code and data. Defines an interface to its code and data. Each object can be perceived as a black box. Slide 4

5 Objects If objects are self contained then they can be Reused. Maintained without side effects. Used without understanding internal implementation/representation. This is good, yes? Slide 5

6 Are Objects Good? Well, yes And no. First some history. Slide 6

7 A Brief History of C++ C++ development started Slide 7

8 A Brief History of C++ Named C Slide 8

9 A Brief History of C++ First Commercial release Slide 9

10 A Brief History of C++ Release of v Slide 10

11 A Brief History of C++ Release of v2.0 Added multiple inheritance, abstract classes, static member functions, const member functions protected members Slide 11

12 A Brief History of C++ Standardised Slide 12

13 A Brief History of C++ Updated Slide 13

14 A Brief History of C++ C++0x ? Slide 14

15 So what has changed since 1979? Many more features have been added to C++ CPUs have become much faster. Transition to multiple cores Memory has become faster. Slide 15

16 CPU performance Slide 16 Computer architecture: a quantitative approach By John L. Hennessy, David A. Patterson, Andrea C. Arpaci-Dusseau

17 CPU/Memory performance Slide 17 Computer architecture: a quantitative approach By John L. Hennessy, David A. Patterson, Andrea C. Arpaci-Dusseau

18 What has changed since 1979? One of the biggest changes is that memory access speeds are far slower (relatively) 1980: RAM latency ~ 1 cycle 2009: RAM latency ~ 400+ cycles What can you do in 400 cycles? Slide 18

19 What has this to do with OO? OO classes encapsulate code and data. So, an instantiated object will generally contain all data associated with it. Slide 19

20 My Claim With modern HW (particularly consoles), excessive encapsulation is BAD. Data flow should be fundamental to your design (Data Oriented Design) Slide 20

21 Consider a simple OO Scene Tree Base Object class Contains general data Node Container class Modifier Updates transforms Drawable/Cube Renders objects Slide 21

22 Each object Object Maintains bounding sphere for culling Has transform (local and world) Dirty flag (optimisation) Pointer to Parent Slide 22

23 Class Definition Objects Each square is 4 bytes Memory Layout Slide 23

24 Nodes Each Node is an object, plus Has a container of other objects Has a visibility flag. Slide 24

25 Nodes Class Definition Memory Layout Slide 25

26 Consider the following code Update the world transform and world space bounding sphere for each object. Slide 26

27 Consider the following code Leaf nodes (objects) return transformed bounding spheres Slide 27

28 Consider the following code Leaf nodes What s (objects) wrong with this return transformed code? bounding spheres Slide 28

29 Consider the following code Leaf nodes If m_dirty=false (objects) then return we get branch transformed misprediction which costs 23 or 24 bounding spheres cycles. Slide 29

30 Consider the following code Leaf nodes (objects) return transformed Calculation of the world bounding sphere bounding spheres takes only 12 cycles. Slide 30

31 Consider the following code Leaf nodes (objects) return transformed So using a dirty flag here is actually bounding spheres slower than not using one (in the case where it is false) Slide 31

32 Lets illustrate cache usage Main Memory Each cache line is 128 bytes L2 Cache Slide 32

33 Cache usage Main Memory L2 Cache parenttransform is already in the cache (somewhere) Slide 33

34 Main Memory Cache usage Assume this is a 128byte boundary (start of cacheline) L2 Cache Slide 34

35 Cache usage Main Memory L2 Cache Load m_transform into cache Slide 35

36 Cache usage Main Memory L2 Cache m_worldtransform is stored via cache (write-back) Slide 36

37 Cache usage Main Memory L2 Cache Next it loads m_objects Slide 37

38 Cache usage Main Memory L2 Cache Then a pointer is pulled from somewhere else (Memory managed by std::vector) Slide 38

39 Cache usage Main Memory L2 Cache vtbl ptr loaded into Cache Slide 39

40 Cache usage Main Memory L2 Cache Look up virtual function Slide 40

41 Cache usage Main Memory L2 Cache Then branch to that code (load in instructions) Slide 41

42 Cache usage Main Memory L2 Cache New code checks dirty flag then sets world bounding sphere Slide 42

43 Cache usage Main Memory L2 Cache Node s World Bounding Sphere is then Expanded Slide 43

44 Cache usage Main Memory L2 Cache Then the next Object is processed Slide 44

45 Cache usage Main Memory L2 Cache First object costs at least 7 cache misses Slide 45

46 Cache usage Main Memory L2 Cache Subsequent objects cost at least 2 cache misses each Slide 46

47 The Test 11,111 nodes/objects in a tree 5 levels deep Every node being transformed Hierarchical culling of tree Render method is empty Slide 47

48 Performance This is the time taken just to traverse the tree! Slide 48

49 Why is it so slow? ~22ms Slide 49

50 Look at GetWorldBoundingSphere() Slide 50

51 Samples can be a little misleading at the source code level Slide 51

52 if(!m_dirty) comparison Slide 52

53 Slide 53 Stalls due to the load 2 instructions earlier

54 Slide 54 Similarly with the matrix multiply

55 Some rough calculations Branch Mispredictions: 23 cycles each ~= 0.36ms Slide 55

56 Some rough calculations Branch Mispredictions: 23 cycles each ~= 0.36ms L2 Cache misses: 400 cycles each ~= 4.54ms Slide 56

57 From Tuner, ~ 3 L2 cache misses per object These cache misses are mostly sequential (more than 1 fetch from main memory can happen at once) Code/cache miss/code/cache miss/code Slide 57

58 Slow memory is the problem here How can we fix it? And still keep the same functionality and interface? Slide 58

59 The first step Use homogenous, sequential sets of data Slide 59

60 Homogeneous Sequential Data Slide 60

61 Generating Contiguous Data Use custom allocators Minimal impact on existing code Allocate contiguous Nodes Matrices Bounding spheres Slide 61

62 Performance 19.6ms -> 12.9ms 35% faster just by moving things around in memory! Slide 62

63 What next? Process data in order Use implicit structure for hierarchy Minimise to and fro from nodes. Group logic to optimally use what is already in cache. Remove regularly called virtuals. Slide 63

64 We start with a parent Node Hierarchy Node Slide 64

65 Hierarchy Node Node Which has children nodes Node Slide 65

66 Hierarchy Node Node And they have a parent Node Slide 66

67 Hierarchy Node Node Node Node Node Node Node Node Node Node Node And they have children Slide 67

68 Hierarchy Node Node Node Node Node Node Node Node Node Node Node And they all have parents Slide 68

69 Hierarchy Node Node Node Node Node Node Node Node Node Node Node Node Node Node Node Node Node A lot of this information can be inferred Slide 69

70 Hierarchy Node Node Node Use a set of arrays, one per hierarchy level Node Node Node Node Node Node Node Node Slide 70

71 Hierarchy Node :2 Parent has 2 children Node :4 Node :4 Children have 4 children Node Node Node Node Node Node Node Node Slide 71

72 Hierarchy Node :2 Node :4 Node :4 Ensure nodes and their data are contiguous in memory Node Node Node Node Node Node Node Node Slide 72

73 Make the processing global rather than local Pull the updates out of the objects. No more virtuals Easier to understand too all code in one place. Slide 73

74 OO version Need to change some things Update transform top down and expand WBS bottom up Slide 74

75 Update transform Node Node Node Node Node Node Node Node Node Node Node Slide 75

76 Update transform Node Node Node Node Node Node Node Node Node Node Node Slide 76

77 Node Node Node Node Node Node Node Node Node Node Node Update transform and world bounding sphere Slide 77

78 Node Node Node Node Node Node Node Node Node Node Node Add bounding sphere of child Slide 78

79 Node Node Node Node Node Node Node Node Node Node Node Update transform and world bounding sphere Slide 79

80 Node Node Node Node Node Node Node Node Node Node Node Add bounding sphere of child Slide 80

81 Node Node Node Node Node Node Node Node Node Node Node Update transform and world bounding sphere Slide 81

82 Node Node Node Node Node Node Node Node Node Node Node Add bounding sphere of child Slide 82

83 Hierarchical bounding spheres pass info up Transforms cascade down Data use and code is striped. Processing is alternating Slide 83

84 Conversion to linear To do this with a flat hierarchy, break it into 2 passes Update the transforms and bounding spheres(from top down) Expand bounding spheres (bottom up) Slide 84

85 Transform and BS updates Node :2 Node :4 Node :4 For each node at each level (top down) { multiply world transform by parent s transform wbs by world transform } Node Node Node Node Node Node Node Node Slide 85

86 Update bounding sphere hierarchies Node :2 Node :4 Node :4 For each node at each level (bottom up) { add wbs to parent s } cull wbs against frustum } Node Node Node Node Node Node Node Node Slide 86

87 Update Transform and Bounding Sphere How many children nodes to process Slide 87

88 Update Transform and Bounding Sphere For each child, update transform and bounding sphere Slide 88

89 Update Transform and Bounding Sphere Note the contiguous arrays Slide 89

90 So, what s happening in the cache? Parent Unified L2 Cache Children s node data not needed Parent Data Childrens Data Slide 90

91 Load parent and its transform Parent Unified L2 Cache Parent Data Childrens Data Slide 91

92 Load child transform and set world transform Parent Unified L2 Cache Parent Data Childrens Data Slide 92

93 Parent Load child BS and set WBS Unified L2 Cache Parent Data Childrens Data Slide 93

94 Load child BS and set WBS Parent Next child is calculated with no extra cache misses! Unified L2 Cache Parent Data Childrens Data Slide 94

95 Load child BS and set WBS Parent The next 2 children incur 2 cache misses in total Unified L2 Cache Parent Data Childrens Data Slide 95

96 Prefetching Parent Because all data is linear, we can predict what memory will be needed in ~400 cycles and prefetch Unified L2 Cache Parent Data Childrens Data Slide 96

97 Tuner scans show about 1.7 cache misses per node. But, these misses are much more frequent Code/cache miss/cache miss/code Less stalling Slide 97

98 Performance > > 4.8ms Slide 98

99 Prefetching Data accesses are now predictable Can use prefetch (dcbt) to warm the cache Data streams can be tricky Many reasons for stream termination Easier to just use dcbt blindly (look ahead x number of iterations) Slide 99

100 Prefetching example Prefetch a predetermined number of iterations ahead Ignore incorrect prefetches Slide 100

101 Performance > > 4.8 -> 3.3ms Slide 101

102 A Warning on Prefetching This example makes very heavy use of the cache This can affect other threads use of the cache Multiple threads with heavy cache use may thrash the cache Slide 102

103 The old scan ~22ms Slide 103

104 The new scan ~16.6ms Slide 104

105 Up close ~16.6ms Slide 105

106 Looking at the code (samples) Slide 106

107 Performance counters Branch mispredictions: 2,867 (cf. 47,000) L2 cache misses: 16,064 (cf 36,000) Slide 107

108 In Summary Just reorganising data locations was a win Data + code reorganisation= dramatic improvement. + prefetching equals even more WIN. Slide 108

109 OO is not necessarily EVIL Be careful not to design yourself into a corner Consider data in your design Can you decouple data from objects? code from objects? Be aware of what the compiler and HW are doing Slide 109

110 Its all about the memory Optimise for data first, then code. Memory access is probably going to be your biggest bottleneck Simplify systems KISS Easier to optimise, easier to parallelise Slide 110

111 Homogeneity Keep code and data homogenous Avoid introducing variations Don t test for exceptions sort by them. Not everything needs to be an object If you must have a pattern, then consider using Managers Slide 111

112 Remember You are writing a GAME You have control over the input data Don t be afraid to preformat it drastically if need be. Design for specifics, not generics (generally). Slide 112

113 Data Oriented Design Delivers Better performance Better realisation of code optimisations Often simpler code More parallelisable code Slide 113

114 Questions? The END Slide 114

NVPRO-PIPELINE A RESEARCH RENDERING PIPELINE MARKUS TAVENRATH MATAVENRATH@NVIDIA.COM SENIOR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA

NVPRO-PIPELINE A RESEARCH RENDERING PIPELINE MARKUS TAVENRATH MATAVENRATH@NVIDIA.COM SENIOR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA NVPRO-PIPELINE A RESEARCH RENDERING PIPELINE MARKUS TAVENRATH MATAVENRATH@NVIDIA.COM SENIOR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA GFLOPS 3500 3000 NVPRO-PIPELINE Peak Double Precision FLOPS GPU perf improved

More information

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer. Guest lecturer: David Hovemeyer November 15, 2004 The memory hierarchy Red = Level Access time Capacity Features Registers nanoseconds 100s of bytes fixed Cache nanoseconds 1-2 MB fixed RAM nanoseconds

More information

Introduction to Data-Oriented Design

Introduction to Data-Oriented Design Introduction to Data-Oriented Design So what is this Data-Oriented Design? It s about on shifting focus to how data is read and written Why should we care? Performance A read from memory takes ~600 cycles

More information

recursion, O(n), linked lists 6/14

recursion, O(n), linked lists 6/14 recursion, O(n), linked lists 6/14 recursion reducing the amount of data to process and processing a smaller amount of data example: process one item in a list, recursively process the rest of the list

More information

2

2 1 2 3 4 5 For Description of these Features see http://download.intel.com/products/processor/corei7/prod_brief.pdf The following Features Greatly affect Performance Monitoring The New Performance Monitoring

More information

In-Memory Databases Algorithms and Data Structures on Modern Hardware. Martin Faust David Schwalb Jens Krüger Jürgen Müller

In-Memory Databases Algorithms and Data Structures on Modern Hardware. Martin Faust David Schwalb Jens Krüger Jürgen Müller In-Memory Databases Algorithms and Data Structures on Modern Hardware Martin Faust David Schwalb Jens Krüger Jürgen Müller The Free Lunch Is Over 2 Number of transistors per CPU increases Clock frequency

More information

Caching Mechanisms for Mobile and IOT Devices

Caching Mechanisms for Mobile and IOT Devices Caching Mechanisms for Mobile and IOT Devices Masafumi Takahashi Toshiba Corporation JEDEC Mobile & IOT Technology Forum Copyright 2016 Toshiba Corporation Background. Unified concept. Outline The first

More information

Unit 4.3 - Storage Structures 1. Storage Structures. Unit 4.3

Unit 4.3 - Storage Structures 1. Storage Structures. Unit 4.3 Storage Structures Unit 4.3 Unit 4.3 - Storage Structures 1 The Physical Store Storage Capacity Medium Transfer Rate Seek Time Main Memory 800 MB/s 500 MB Instant Hard Drive 10 MB/s 120 GB 10 ms CD-ROM

More information

Node-Based Structures Linked Lists: Implementation

Node-Based Structures Linked Lists: Implementation Linked Lists: Implementation CS 311 Data Structures and Algorithms Lecture Slides Monday, March 30, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org

More information

Chapter 7 Memory Management

Chapter 7 Memory Management Operating Systems: Internals and Design Principles Chapter 7 Memory Management Eighth Edition William Stallings Frame Page Segment A fixed-length block of main memory. A fixed-length block of data that

More information

Lecture 18: Reliable Storage

Lecture 18: Reliable Storage CS 422/522 Design & Implementation of Operating Systems Lecture 18: Reliable Storage Zhong Shao Dept. of Computer Science Yale University Acknowledgement: some slides are taken from previous versions of

More information

Operating Systems. Virtual Memory

Operating Systems. Virtual Memory Operating Systems Virtual Memory Virtual Memory Topics. Memory Hierarchy. Why Virtual Memory. Virtual Memory Issues. Virtual Memory Solutions. Locality of Reference. Virtual Memory with Segmentation. Page

More information

Binary search tree with SIMD bandwidth optimization using SSE

Binary search tree with SIMD bandwidth optimization using SSE Binary search tree with SIMD bandwidth optimization using SSE Bowen Zhang, Xinwei Li 1.ABSTRACT In-memory tree structured index search is a fundamental database operation. Modern processors provide tremendous

More information

File System Management

File System Management Lecture 7: Storage Management File System Management Contents Non volatile memory Tape, HDD, SSD Files & File System Interface Directories & their Organization File System Implementation Disk Space Allocation

More information

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program

language 1 (source) compiler language 2 (target) Figure 1: Compiling a program CS 2112 Lecture 27 Interpreters, compilers, and the Java Virtual Machine 1 May 2012 Lecturer: Andrew Myers 1 Interpreters vs. compilers There are two strategies for obtaining runnable code from a program

More information

Physical Data Organization

Physical Data Organization Physical Data Organization Database design using logical model of the database - appropriate level for users to focus on - user independence from implementation details Performance - other major factor

More information

Computer Organization and Architecture

Computer Organization and Architecture Computer Organization and Architecture Chapter 11 Instruction Sets: Addressing Modes and Formats Instruction Set Design One goal of instruction set design is to minimize instruction length Another goal

More information

External Sorting. Why Sort? 2-Way Sort: Requires 3 Buffers. Chapter 13

External Sorting. Why Sort? 2-Way Sort: Requires 3 Buffers. Chapter 13 External Sorting Chapter 13 Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Why Sort? A classic problem in computer science! Data requested in sorted order e.g., find students in increasing

More information

DATABASE DESIGN - 1DL400

DATABASE DESIGN - 1DL400 DATABASE DESIGN - 1DL400 Spring 2015 A course on modern database systems!! http://www.it.uu.se/research/group/udbl/kurser/dbii_vt15/ Kjell Orsborn! Uppsala Database Laboratory! Department of Information

More information

INSTRUCTION LEVEL PARALLELISM PART VII: REORDER BUFFER

INSTRUCTION LEVEL PARALLELISM PART VII: REORDER BUFFER Course on: Advanced Computer Architectures INSTRUCTION LEVEL PARALLELISM PART VII: REORDER BUFFER Prof. Cristina Silvano Politecnico di Milano cristina.silvano@polimi.it Prof. Silvano, Politecnico di Milano

More information

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2 Lecture Handout Computer Architecture Lecture No. 2 Reading Material Vincent P. Heuring&Harry F. Jordan Chapter 2,Chapter3 Computer Systems Design and Architecture 2.1, 2.2, 3.2 Summary 1) A taxonomy of

More information

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group Shader Model 3.0 Ashu Rege NVIDIA Developer Technology Group Talk Outline Quick Intro GeForce 6 Series (NV4X family) New Vertex Shader Features Vertex Texture Fetch Longer Programs and Dynamic Flow Control

More information

Distribution One Server Requirements

Distribution One Server Requirements Distribution One Server Requirements Introduction Welcome to the Hardware Configuration Guide. The goal of this guide is to provide a practical approach to sizing your Distribution One application and

More information

Data Structure with C

Data Structure with C Subject: Data Structure with C Topic : Tree Tree A tree is a set of nodes that either:is empty or has a designated node, called the root, from which hierarchically descend zero or more subtrees, which

More information

The 2014 Bottleneck Report on Enterprise Mobile

The 2014 Bottleneck Report on Enterprise Mobile The 2014 Bottleneck Report on Enterprise Mobile What s the big bottleneck for enterprise mobile app development this year, and how do you get past it? 1 / 32 The 2014 Bottleneck Report on Enterprise Mobile

More information

Optimizing matrix multiplication Amitabha Banerjee abanerjee@ucdavis.edu

Optimizing matrix multiplication Amitabha Banerjee abanerjee@ucdavis.edu Optimizing matrix multiplication Amitabha Banerjee abanerjee@ucdavis.edu Present compilers are incapable of fully harnessing the processor architecture complexity. There is a wide gap between the available

More information

Solution: start more than one instruction in the same clock cycle CPI < 1 (or IPC > 1, Instructions per Cycle) Two approaches:

Solution: start more than one instruction in the same clock cycle CPI < 1 (or IPC > 1, Instructions per Cycle) Two approaches: Multiple-Issue Processors Pipelining can achieve CPI close to 1 Mechanisms for handling hazards Static or dynamic scheduling Static or dynamic branch handling Increase in transistor counts (Moore s Law):

More information

Lag Sucks! R.J. Lorimer Director of Platform Engineering Electrotank, Inc. Robert Greene Vice President of Technology Versant Corporation

Lag Sucks! R.J. Lorimer Director of Platform Engineering Electrotank, Inc. Robert Greene Vice President of Technology Versant Corporation Lag Sucks! Making Online Gaming Faster with NoSQL (and without Breaking the Bank) R.J. Lorimer Director of Platform Engineering Electrotank, Inc. Robert Greene Vice President of Technology Versant Corporation

More information

361 Computer Architecture Lecture 14: Cache Memory

361 Computer Architecture Lecture 14: Cache Memory 1 361 Computer Architecture Lecture 14 Memory cache.1 The Motivation for s Memory System Processor DRAM Motivation Large memories (DRAM) are slow Small memories (SRAM) are fast Make the average access

More information

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? Inside the CPU how does the CPU work? what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored? some short, boring programs to illustrate the

More information

Architecture Sensitive Database Design: Examples from the Columbia Group

Architecture Sensitive Database Design: Examples from the Columbia Group Architecture Sensitive Database Design: Examples from the Columbia Group Kenneth A. Ross Columbia University John Cieslewicz Columbia University Jun Rao IBM Research Jingren Zhou Microsoft Research In

More information

A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and:

A binary search tree or BST is a binary tree that is either empty or in which the data element of each node has a key, and: Binary Search Trees 1 The general binary tree shown in the previous chapter is not terribly useful in practice. The chief use of binary trees is for providing rapid access to data (indexing, if you will)

More information

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The

More information

Glossary of Object Oriented Terms

Glossary of Object Oriented Terms Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction

More information

MS SQL Performance (Tuning) Best Practices:

MS SQL Performance (Tuning) Best Practices: MS SQL Performance (Tuning) Best Practices: 1. Don t share the SQL server hardware with other services If other workloads are running on the same server where SQL Server is running, memory and other hardware

More information

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. 1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D. base address 2. The memory address of fifth element of an array can be calculated

More information

Compiling Object Oriented Languages. What is an Object-Oriented Programming Language? Implementation: Dynamic Binding

Compiling Object Oriented Languages. What is an Object-Oriented Programming Language? Implementation: Dynamic Binding Compiling Object Oriented Languages What is an Object-Oriented Programming Language? Last time Dynamic compilation Today Introduction to compiling object oriented languages What are the issues? Objects

More information

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS) KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

More information

EE482: Advanced Computer Organization Lecture #11 Processor Architecture Stanford University Wednesday, 31 May 2000. ILP Execution

EE482: Advanced Computer Organization Lecture #11 Processor Architecture Stanford University Wednesday, 31 May 2000. ILP Execution EE482: Advanced Computer Organization Lecture #11 Processor Architecture Stanford University Wednesday, 31 May 2000 Lecture #11: Wednesday, 3 May 2000 Lecturer: Ben Serebrin Scribe: Dean Liu ILP Execution

More information

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar

Object Oriented Databases. OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar Object Oriented Databases OOAD Fall 2012 Arjun Gopalakrishna Bhavya Udayashankar Executive Summary The presentation on Object Oriented Databases gives a basic introduction to the concepts governing OODBs

More information

PERFORMANCE MODELS FOR APACHE ACCUMULO:

PERFORMANCE MODELS FOR APACHE ACCUMULO: Securely explore your data PERFORMANCE MODELS FOR APACHE ACCUMULO: THE HEAVY TAIL OF A SHAREDNOTHING ARCHITECTURE Chris McCubbin Director of Data Science Sqrrl Data, Inc. I M NOT ADAM FUCHS But perhaps

More information

Trace-Based and Sample-Based Profiling in Rational Application Developer

Trace-Based and Sample-Based Profiling in Rational Application Developer Trace-Based and Sample-Based Profiling in Rational Application Developer This document is aimed at highlighting the importance of profiling in software development and talks about the profiling tools offered

More information

Conquer the 5 Most Common Magento Coding Issues to Optimize Your Site for Performance

Conquer the 5 Most Common Magento Coding Issues to Optimize Your Site for Performance Conquer the 5 Most Common Magento Coding Issues to Optimize Your Site for Performance Written by: Oleksandr Zarichnyi Table of Contents INTRODUCTION... TOP 5 ISSUES... LOOPS... Calculating the size of

More information

CSE 326: Data Structures B-Trees and B+ Trees

CSE 326: Data Structures B-Trees and B+ Trees Announcements (4//08) CSE 26: Data Structures B-Trees and B+ Trees Brian Curless Spring 2008 Midterm on Friday Special office hour: 4:-5: Thursday in Jaech Gallery (6 th floor of CSE building) This is

More information

Basics of VTune Performance Analyzer. Intel Software College. Objectives. VTune Performance Analyzer. Agenda

Basics of VTune Performance Analyzer. Intel Software College. Objectives. VTune Performance Analyzer. Agenda Objectives At the completion of this module, you will be able to: Understand the intended purpose and usage models supported by the VTune Performance Analyzer. Identify hotspots by drilling down through

More information

Chapter 13: Query Processing. Basic Steps in Query Processing

Chapter 13: Query Processing. Basic Steps in Query Processing Chapter 13: Query Processing! Overview! Measures of Query Cost! Selection Operation! Sorting! Join Operation! Other Operations! Evaluation of Expressions 13.1 Basic Steps in Query Processing 1. Parsing

More information

(Refer Slide Time: 2:03)

(Refer Slide Time: 2:03) Control Engineering Prof. Madan Gopal Department of Electrical Engineering Indian Institute of Technology, Delhi Lecture - 11 Models of Industrial Control Devices and Systems (Contd.) Last time we were

More information

CS 4620 Practicum Programming Assignment 6 Animation

CS 4620 Practicum Programming Assignment 6 Animation CS 4620 Practicum Programming Assignment 6 Animation out: Friday 14th November 2014 due: : Monday 24th November 2014 1 Introduction In this assignment, we will explore a common topic in animation: key

More information

C++ INTERVIEW QUESTIONS

C++ INTERVIEW QUESTIONS C++ INTERVIEW QUESTIONS http://www.tutorialspoint.com/cplusplus/cpp_interview_questions.htm Copyright tutorialspoint.com Dear readers, these C++ Interview Questions have been designed specially to get

More information

Analysis of Micromouse Maze Solving Algorithms

Analysis of Micromouse Maze Solving Algorithms 1 Analysis of Micromouse Maze Solving Algorithms David M. Willardson ECE 557: Learning from Data, Spring 2001 Abstract This project involves a simulation of a mouse that is to find its way through a maze.

More information

Business Application

Business Application 137 Germain CRT Validation Rules for Siebel CRM 7.7,7.8,8.0,8.1,8.2 Validation Rule Name Validation Rule Description Business Application Siebel Repository Level Improve CPU Improve Memory GS-SBL-REP-JDBC-1001

More information

Cobol. By: Steven Conner. COBOL, COmmon Business Oriented Language, one of the. oldest programming languages, was designed in the last six

Cobol. By: Steven Conner. COBOL, COmmon Business Oriented Language, one of the. oldest programming languages, was designed in the last six Cobol By: Steven Conner History: COBOL, COmmon Business Oriented Language, one of the oldest programming languages, was designed in the last six months of 1959 by the CODASYL Committee, COnference on DAta

More information

Object Oriented Design

Object Oriented Design Object Oriented Design Kenneth M. Anderson Lecture 20 CSCI 5828: Foundations of Software Engineering OO Design 1 Object-Oriented Design Traditional procedural systems separate data and procedures, and

More information

PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design

PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions. Outline. Performance oriented design PART IV Performance oriented design, Performance testing, Performance tuning & Performance solutions Slide 1 Outline Principles for performance oriented design Performance testing Performance tuning General

More information

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C Tutorial#1 Q 1:- Explain the terms data, elementary item, entity, primary key, domain, attribute and information? Also give examples in support of your answer? Q 2:- What is a Data Type? Differentiate

More information

Qint Software - Technical White Paper

Qint Software - Technical White Paper Qint Software - Technical White Paper Improved Reporting and Document Generation via Object-Oriented Data Access and Enterprise Information Integration Objects do not only change the way in which we develop

More information

Measuring the Performance of Prefetching Proxy Caches

Measuring the Performance of Prefetching Proxy Caches Measuring the Performance of Prefetching Proxy Caches Brian D. Davison davison@cs.rutgers.edu Department of Computer Science Rutgers, The State University of New Jersey The Problem Traffic Growth User

More information

Optimal Binary Search Trees Meet Object Oriented Programming

Optimal Binary Search Trees Meet Object Oriented Programming Optimal Binary Search Trees Meet Object Oriented Programming Stuart Hansen and Lester I. McCann Computer Science Department University of Wisconsin Parkside Kenosha, WI 53141 {hansen,mccann}@cs.uwp.edu

More information

Sitecore Health. Christopher Wojciech. netzkern AG. christopher.wojciech@netzkern.de. Sitecore User Group Conference 2015

Sitecore Health. Christopher Wojciech. netzkern AG. christopher.wojciech@netzkern.de. Sitecore User Group Conference 2015 Sitecore Health Christopher Wojciech netzkern AG christopher.wojciech@netzkern.de Sitecore User Group Conference 2015 1 Hi, % Increase in Page Abondonment 40% 30% 20% 10% 0% 2 sec to 4 2 sec to 6 2 sec

More information

Low Power AMD Athlon 64 and AMD Opteron Processors

Low Power AMD Athlon 64 and AMD Opteron Processors Low Power AMD Athlon 64 and AMD Opteron Processors Hot Chips 2004 Presenter: Marius Evers Block Diagram of AMD Athlon 64 and AMD Opteron Based on AMD s 8 th generation architecture AMD Athlon 64 and AMD

More information

Architecture of Hitachi SR-8000

Architecture of Hitachi SR-8000 Architecture of Hitachi SR-8000 University of Stuttgart High-Performance Computing-Center Stuttgart (HLRS) www.hlrs.de Slide 1 Most of the slides from Hitachi Slide 2 the problem modern computer are data

More information

EE282 Computer Architecture and Organization Midterm Exam February 13, 2001. (Total Time = 120 minutes, Total Points = 100)

EE282 Computer Architecture and Organization Midterm Exam February 13, 2001. (Total Time = 120 minutes, Total Points = 100) EE282 Computer Architecture and Organization Midterm Exam February 13, 2001 (Total Time = 120 minutes, Total Points = 100) Name: (please print) Wolfe - Solution In recognition of and in the spirit of the

More information

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R Binary Search Trees A Generic Tree Nodes in a binary search tree ( B-S-T) are of the form P parent Key A Satellite data L R B C D E F G H I J The B-S-T has a root node which is the only node whose parent

More information

Quiz for Chapter 1 Computer Abstractions and Technology 3.10

Quiz for Chapter 1 Computer Abstractions and Technology 3.10 Date: 3.10 Not all questions are of equal difficulty. Please review the entire quiz first and then budget your time carefully. Name: Course: Solutions in Red 1. [15 points] Consider two different implementations,

More information

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters

Interpreters and virtual machines. Interpreters. Interpreters. Why interpreters? Tree-based interpreters. Text-based interpreters Interpreters and virtual machines Michel Schinz 2007 03 23 Interpreters Interpreters Why interpreters? An interpreter is a program that executes another program, represented as some kind of data-structure.

More information

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement? 1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

More information

Virtuoso and Database Scalability

Virtuoso and Database Scalability Virtuoso and Database Scalability By Orri Erling Table of Contents Abstract Metrics Results Transaction Throughput Initializing 40 warehouses Serial Read Test Conditions Analysis Working Set Effect of

More information

The Classical Architecture. Storage 1 / 36

The Classical Architecture. Storage 1 / 36 1 / 36 The Problem Application Data? Filesystem Logical Drive Physical Drive 2 / 36 Requirements There are different classes of requirements: Data Independence application is shielded from physical storage

More information

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes. 1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The

More information

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team Lecture Summary In this lecture, we learned about the ADT Priority Queue. A

More information

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) Subject Description: This subject deals with discrete structures like set theory, mathematical

More information

Maximizing VMware ESX Performance Through Defragmentation of Guest Systems. Presented by

Maximizing VMware ESX Performance Through Defragmentation of Guest Systems. Presented by Maximizing VMware ESX Performance Through Defragmentation of Guest Systems Presented by July, 2010 Table of Contents EXECUTIVE OVERVIEW 3 TEST EQUIPMENT AND METHODS 4 TESTING OVERVIEW 5 Fragmentation in

More information

Increasing Flash Throughput for Big Data Applications (Data Management Track)

Increasing Flash Throughput for Big Data Applications (Data Management Track) Scale Simplify Optimize Evolve Increasing Flash Throughput for Big Data Applications (Data Management Track) Flash Memory 1 Industry Context Addressing the challenge A proposed solution Review of the Benefits

More information

EE361: Digital Computer Organization Course Syllabus

EE361: Digital Computer Organization Course Syllabus EE361: Digital Computer Organization Course Syllabus Dr. Mohammad H. Awedh Spring 2014 Course Objectives Simply, a computer is a set of components (Processor, Memory and Storage, Input/Output Devices)

More information

MySQL performance in a cloud. Mark Callaghan

MySQL performance in a cloud. Mark Callaghan MySQL performance in a cloud Mark Callaghan Special thanks Eric Hammond (http://www.anvilon.com) provided documentation that made all of my work much easier. What is this thing called a cloud? Deployment

More information

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen LECTURE 14: DATA STORAGE AND REPRESENTATION Data Storage Memory Hierarchy Disks Fields, Records, Blocks Variable-length

More information

Vector storage and access; algorithms in GIS. This is lecture 6

Vector storage and access; algorithms in GIS. This is lecture 6 Vector storage and access; algorithms in GIS This is lecture 6 Vector data storage and access Vectors are built from points, line and areas. (x,y) Surface: (x,y,z) Vector data access Access to vector

More information

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages

Language Evaluation Criteria. Evaluation Criteria: Readability. Evaluation Criteria: Writability. ICOM 4036 Programming Languages ICOM 4036 Programming Languages Preliminaries Dr. Amirhossein Chinaei Dept. of Electrical & Computer Engineering UPRM Spring 2010 Language Evaluation Criteria Readability: the ease with which programs

More information

1. Comments on reviews a. Need to avoid just summarizing web page asks you for:

1. Comments on reviews a. Need to avoid just summarizing web page asks you for: 1. Comments on reviews a. Need to avoid just summarizing web page asks you for: i. A one or two sentence summary of the paper ii. A description of the problem they were trying to solve iii. A summary of

More information

Computer Systems Structure Input/Output

Computer Systems Structure Input/Output Computer Systems Structure Input/Output Peripherals Computer Central Processing Unit Main Memory Computer Systems Interconnection Communication lines Input Output Ward 1 Ward 2 Examples of I/O Devices

More information

1 Introduction. 2 An Interpreter. 2.1 Handling Source Code

1 Introduction. 2 An Interpreter. 2.1 Handling Source Code 1 Introduction The purpose of this assignment is to write an interpreter for a small subset of the Lisp programming language. The interpreter should be able to perform simple arithmetic and comparisons

More information

ios App Performance Things to Take Care

ios App Performance Things to Take Care ios App Performance Things to Take Care Gurpreet Singh Sachdeva Engineering Manager @ Yahoo Who should attend this session? If you are developing or planning to develop ios apps and looking for tips to

More information

File Systems Management and Examples

File Systems Management and Examples File Systems Management and Examples Today! Efficiency, performance, recovery! Examples Next! Distributed systems Disk space management! Once decided to store a file as sequence of blocks What s the size

More information

Systolic Computing. Fundamentals

Systolic Computing. Fundamentals Systolic Computing Fundamentals Motivations for Systolic Processing PARALLEL ALGORITHMS WHICH MODEL OF COMPUTATION IS THE BETTER TO USE? HOW MUCH TIME WE EXPECT TO SAVE USING A PARALLEL ALGORITHM? HOW

More information

Optimizing LTO Backup Performance

Optimizing LTO Backup Performance Optimizing LTO Backup Performance July 19, 2011 Written by: Ash McCarty Contributors: Cedrick Burton Bob Dawson Vang Nguyen Richard Snook Table of Contents 1.0 Introduction... 3 2.0 Host System Configuration...

More information

Speeding up a Slow SuperSalon PC

Speeding up a Slow SuperSalon PC Speeding up a Slow SuperSalon PC Inevitably, a computer will slow down in operation when an improper maintenance and/or set up is a factor. And unfortunately, most salon staff do not double as IT personnel.

More information

HBase Schema Design. NoSQL Ma4ers, Cologne, April 2013. Lars George Director EMEA Services

HBase Schema Design. NoSQL Ma4ers, Cologne, April 2013. Lars George Director EMEA Services HBase Schema Design NoSQL Ma4ers, Cologne, April 2013 Lars George Director EMEA Services About Me Director EMEA Services @ Cloudera ConsulFng on Hadoop projects (everywhere) Apache Commi4er HBase and Whirr

More information

This Unit: Putting It All Together. CIS 501 Computer Architecture. Sources. What is Computer Architecture?

This Unit: Putting It All Together. CIS 501 Computer Architecture. Sources. What is Computer Architecture? This Unit: Putting It All Together CIS 501 Computer Architecture Unit 11: Putting It All Together: Anatomy of the XBox 360 Game Console Slides originally developed by Amir Roth with contributions by Milo

More information

NAND Flash FAQ. Eureka Technology. apn5_87. NAND Flash FAQ

NAND Flash FAQ. Eureka Technology. apn5_87. NAND Flash FAQ What is NAND Flash? What is the major difference between NAND Flash and other Memory? Structural differences between NAND Flash and NOR Flash What does NAND Flash controller do? How to send command to

More information

Chapter 8: Bags and Sets

Chapter 8: Bags and Sets Chapter 8: Bags and Sets In the stack and the queue abstractions, the order that elements are placed into the container is important, because the order elements are removed is related to the order in which

More information

CUDA Optimization with NVIDIA Tools. Julien Demouth, NVIDIA

CUDA Optimization with NVIDIA Tools. Julien Demouth, NVIDIA CUDA Optimization with NVIDIA Tools Julien Demouth, NVIDIA What Will You Learn? An iterative method to optimize your GPU code A way to conduct that method with Nvidia Tools 2 What Does the Application

More information

Equalizer. Parallel OpenGL Application Framework. Stefan Eilemann, Eyescale Software GmbH

Equalizer. Parallel OpenGL Application Framework. Stefan Eilemann, Eyescale Software GmbH Equalizer Parallel OpenGL Application Framework Stefan Eilemann, Eyescale Software GmbH Outline Overview High-Performance Visualization Equalizer Competitive Environment Equalizer Features Scalability

More information

Shared File Performance Improvements

Shared File Performance Improvements Shared File Performance Improvements LDLM Lock Ahead Patrick Farrell (paf@cray.com) Shared File vs FPP Two principal approaches to writing out data: File-per-process or single shared file File-per-process

More information

1/20/2016 INTRODUCTION

1/20/2016 INTRODUCTION INTRODUCTION 1 Programming languages have common concepts that are seen in all languages This course will discuss and illustrate these common concepts: Syntax Names Types Semantics Memory Management We

More information

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of

CS:APP Chapter 4 Computer Architecture. Wrap-Up. William J. Taffe Plymouth State University. using the slides of CS:APP Chapter 4 Computer Architecture Wrap-Up William J. Taffe Plymouth State University using the slides of Randal E. Bryant Carnegie Mellon University Overview Wrap-Up of PIPE Design Performance analysis

More information

POWER8 Performance Analysis

POWER8 Performance Analysis POWER8 Performance Analysis Satish Kumar Sadasivam Senior Performance Engineer, Master Inventor IBM Systems and Technology Labs satsadas@in.ibm.com #OpenPOWERSummit Join the conversation at #OpenPOWERSummit

More information

A3 Computer Architecture

A3 Computer Architecture A3 Computer Architecture Engineering Science 3rd year A3 Lectures Prof David Murray david.murray@eng.ox.ac.uk www.robots.ox.ac.uk/ dwm/courses/3co Michaelmas 2000 1 / 1 6. Stacks, Subroutines, and Memory

More information

QLIKVIEW SERVER MEMORY MANAGEMENT AND CPU UTILIZATION

QLIKVIEW SERVER MEMORY MANAGEMENT AND CPU UTILIZATION QLIKVIEW SERVER MEMORY MANAGEMENT AND CPU UTILIZATION QlikView Scalability Center Technical Brief Series September 2012 qlikview.com Introduction This technical brief provides a discussion at a fundamental

More information

Reconfigurable Architecture Requirements for Co-Designed Virtual Machines

Reconfigurable Architecture Requirements for Co-Designed Virtual Machines Reconfigurable Architecture Requirements for Co-Designed Virtual Machines Kenneth B. Kent University of New Brunswick Faculty of Computer Science Fredericton, New Brunswick, Canada ken@unb.ca Micaela Serra

More information

Sequences in the C++ STL

Sequences in the C++ STL CS 311 Data Structures and Algorithms Lecture Slides Wednesday, November 4, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks CHAPPELLG@member.ams.org 2005 2009 Glenn

More information