Development of Benchmarking Suite for Various Ruby Implementations

Total Page:16

File Type:pdf, Size:1020Kb

Development of Benchmarking Suite for Various Ruby Implementations MASARYKOVA UNIVERZITA FAKULTA}w¡¢£¤¥¦§¨ INFORMATIKY !"#$%&'()+,-./012345<yA| Development of benchmarking suite for various Ruby implementations BACHELOR THESIS Richard Ludvigh Brno, Spring 2015 Declaration Hereby I declare, that this paper is my original authorial work, which I have worked out by my own. All sources, references and literature used or excerpted during elaboration of this work are properly cited and listed in complete reference to the due source. Richard Ludvigh Advisor: RNDr. Adam Rambousek ii Acknowledgement I would like to thank my supervisor RNDr. Adam Rambousek who has supported me throughout my thesis. I would also like to thank my advisor Ing. Václav Tunka for advice and consultation regarding technical aspects of work as well as guidance and feedback through- out my thesis. Access to the CERIT-SC computing and storage facilities provided under the programme Center CERIT Scientific Cloud, part of the Op- erational Program Research and Development for Innovations, reg. no. CZ. 1.05/3.2.00/08.0144, is greatly appreciated. iii Abstract Ruby is a modern, dynamic, pure object-oriented programming lan- guage. It has multiple implementations which provide different per- formance. The aim of this bachelor thesis is to provide a container- based tool to benchmark and monitor those performance differences inside an isolated environment. iv Keywords Ruby, JRuby, Rubinius, MRI, Docker, benchmarking, performance v Contents 1 Introduction ............................3 2 State of the art ...........................4 3 Ruby performance ........................6 3.1 Introduction to Ruby ....................6 3.2 Ruby implementations ...................7 3.2.1 MRI or CRuby . .7 3.2.2 JRuby . .7 3.2.3 Rubinius . .8 3.3 Introduction to benchmarking ...............8 3.3.1 Benchmarking suite and framework . .9 4 Requirements and analysis ................... 10 4.1 Requirements ........................ 10 4.2 RVM ............................. 11 4.3 Rbenv ............................. 11 4.4 RVM vs Rbenv ........................ 12 4.5 Docker ............................ 12 4.5.1 Container vs. Virtual Machine . 13 4.5.2 Container vs. Process . 13 4.6 Existing benchmark suites ................. 14 4.6.1 Ruby benchmark suite . 14 4.6.2 Bench9000 . 15 4.6.3 RubyBench . 15 5 Solution and implementation .................. 16 5.1 Docker integration ..................... 17 5.2 Running benchmarks .................... 18 5.2.1 Benchmark code injection . 19 5.2.2 Warm up . 21 5.2.3 Timeout . 22 5.3 Storing and publishing results ............... 22 5.4 Presentation tool ...................... 22 1 CONTENTS 5.4.1 Ruby on Rails . 23 5.4.2 Highcharts . 23 5.4.3 Rubyfy.ME . 23 6 Results ............................... 25 6.1 Environment ......................... 25 6.2 MRI Ruby Compilers .................... 26 6.3 Ruby Implementations ................... 28 6.4 MRI 2.2.0 Incremental garbage collection ........ 31 7 Roadmap .............................. 33 8 Conclusion ............................. 35 2 Chapter 1 Introduction Ruby is a modern, pure object-oriented programming language. It has multiple implementations, but this thesis concentrates on bench- marking three major Ruby implementations: MRI (also called CRuby) the original implementation written in C, JRuby written in Java and Rubinius written in Ruby and C++. These implementations are often compared based on their perfor- mance capabilities. This thesis was not focused on developing new benchmarks for the Ruby language, but to create a suitable and ex- tendable benchmarking tool, that would provide comparable results to determine the differences between these implementations. This tool should be able to take any existing benchmark and run it across different Ruby implementations. The developed benchmarking suite was already described in pa- per Ruby Benchmark Suite using Docker[1]. However the problema- tique and the development process of the benchmarking suite is de- scribed in more detail in this thesis. We discuss the State of the art in the Chapter 2, followed by the description of Ruby langauge and the differences in its three major implementations. To ensure complete isolation of all tested Ruby versions, we used Docker (described in Section 4.5) to bundle each configuration inside a Docker container. In the Chapter 5 the Docker integration and the hierarchy of cre- ated Docker images is described in detail as well as methods used to run and collect data from benchmarks. 3 Chapter 2 State of the art In December 2013 Sam Saffron published a call for official long-run- ning Ruby benchmark1. At that time there were multiple long-term benchmarks like PyPy speed center2 for PyPy Python implementation or Go performance Dashboard3 for Go programming language. When developing a fast software, it is important to know all per- formance issues and improvements of used platforms or program- ming languages. Small performance changes inside core functions of programming language can lead to massive performance changes in the developed software. [2] Finding performance regressions in late phases of development is often more expensive than in early stages. Fixing software prob- lems after the release can be up to 100 times more expensive than finding them in analysis and design stage (relative cost to fix error is displayed below in Figure 2.1) [3]. This is why long-term information about performance issues is important. At the beginning of development of this thesis in November 2014, Ruby still did not have a long-term benchmark. At that time there was just one Ruby benchmarking suite used widely by the com- munity. Ruby Benchmark Suite4 was developed between 2008 and 2013 by Antonio Cangiano. His solution consisted of using a host operating system and already installed Ruby to perform the tests. At that time there were no low-weight virtualization solutions (vir- tual machines consisted of entire guest operating system, bringing 1http://samsaffron.com/archive/2013/12/11/ call-to-action-long-running-ruby-benchmark 2http://speed.pypy.org/ 3http://goperfd.appspot.com/perf 4https://github.com/acangiano/ruby-benchmark-suite 4 2. STATE OF THE ART unwanted overhead during benchmarking) to allow running bench- marks in isolated environments. During development of benchmarking suite described below, Guo Xiang Tan5 presented his own benchmark suite in cooperation with Sam Saffron, that became the official Ruby long-term running bench- mark 6. We discuss the basics of his solution in Chapter 4. Figure 2.1: Relative Cost to Fix Software Errors per Lify Cycle phase. Cited from [4]. 5https://github.com/tgxworld 6http://rubybench.org/ 5 Chapter 3 Ruby performance In this chapter we will introduce the Ruby programming language and its most used implementations. The differences in performance of various Ruby implementations will be discussed followed by the introduction to the benchmarking. 3.1 Introduction to Ruby Ruby is still a very young language. It is an interpreted, object-ori- ented programming language which was designed and released by Jukihiro Macumoto, known as Matz, in 1995. It was designed with Perl and Python capabilities in mind. He described some of his early ideas about the language: “I was talking with my colleague about the possibility of an object- oriented scripting language. I knew Perl (Perl4, not Perl5), but I didn’t like it really, because it had the smell of a toy language (it still has). The object- oriented language seemed very promising. I knew Python then. But I didn’t like it, because I didn’t think it was a true object-oriented language — OO features appeared to be add-on to the language. As a language maniac and OO fan for 15 years, I really wanted a genuine object-oriented, easy-to-use scripting language. I looked for but couldn’t find one. So I decided to make it.“ [5] Ruby was designed as an absolutely pure object-oriented script- ing language, where everything is interpreted as an object, even prim- itive types and the values true, false and nil (nil indicates the absence of value, it is Ruby‘s version of null). Ruby is also suitable for pro- cedural and functional programming styles and it includes powerful metaprogramming capabilities. It is focused on simplicity. Simplicity and pure object-oriented ap- 6 3. RUBY PERFORMANCE proach make it an easy-to-use scripting language. Matz’s guiding philosophy for the design of Ruby is summarized in an oft-quoted remark of his: “Ruby is designed to make programmers happy.“[6] 3.2 Ruby implementations Ruby has many different implementations. In this chapter we will talk about some of the most used ones. We will shortly discuss their advantages, disadvantages and main characteristics. 3.2.1 MRI or CRuby The reference implementation, discussed above, is known as “Matz’s Ruby Interpreter” (MRI) or CRuby (since it is written in C). CRuby does support native threads, which in theory means that we can use threads like Java developers do. The problem is that CRuby uses Global Interpreter Lock (known as GIL) which is meant to protect data integrity, allowing data to be modified only by one thread at a time. GIL allows to create multiple OS level threads, how- ever it does not allow the system to schedule them simultaneously on multiple processors. This is why we cannot achieve (true) con- currency. It is important to mention that GIL makes single threaded programs faster but there are people who still prefer taking data in- tegrity into their own hands. This is where, for example, JRuby and Rubinius come in place for people who need Ruby implementations without GIL. 3.2.2 JRuby JRuby, as the title suggests, is 100% Java implementation of Ruby. This allows developers to run our Ruby applications using Java Vir- tual Machine (JVM), utilizing the JVM’s optimizing just-in-time (JIT) compilers, garbage collectors and concurrent threads, which often means that your Ruby code runs faster and more reliably [7]. It also allows code to interoperate with any other library that is compati- ble with JVM. JRuby is open source software, developed primarily at Red Hat.
Recommended publications
  • Rubyperf.Pdf
    Ruby Performance. Tips, Tricks & Hacks Who am I? • Ezra Zygmuntowicz (zig-mun-tuv-itch) • Rubyist for 4 years • Engine Yard Founder and Architect • Blog: http://brainspl.at Ruby is Slow Ruby is Slow?!? Well, yes and no. The Ruby Performance Dichotomy Framework Code VS Application Code Benchmarking: The only way to really know performance characteristics Profiling: Measure don’t guess. ruby-prof What is all this good for in real life? Merb Merb Like most useful code it started as a hack, Merb == Mongrel + Erb • No cgi.rb !! • Clean room implementation of ActionPack • Thread Safe with configurable Mutex Locks • Rails compatible REST routing • No Magic( well less anyway ;) • Did I mention no cgi.rb? • Fast! On average 2-4 times faster than rails Design Goals • Small core framework for the VC in MVC • ORM agnostic, use ActiveRecord, Sequel, DataMapper or roll your own db access. • Prefer simple code over magic code • Keep the stack traces short( I’m looking at you alias_method_chain) • Thread safe, reentrant code Merb Hello World No code is faster then no code • Simplicity and clarity trumps magic every time. • When in doubt leave it out. • Core framework to stay small and simple and easy to extend without gross hacks • Prefer plugins for non core functionality • Plugins can be gems Key Differences • No auto-render. The return value of your controller actions is what gets returned to client • Merb’s render method just returns a string, allowing for multiple renders and more flexibility • PartController’s allow for encapsualted applets without big performance cost Why not work on Rails instead of making a new framework? • Originally I was trying to optimize Rails and make it more thread safe.
    [Show full text]
  • Insert Here Your Thesis' Task
    Insert here your thesis' task. Czech Technical University in Prague Faculty of Information Technology Department of Software Engineering Master's thesis New Ruby parser and AST for SmallRuby Bc. Jiˇr´ıFajman Supervisor: Ing. Marcel Hlopko 18th February 2016 Acknowledgements I would like to thank to my supervisor Ing. Marcel Hlopko for perfect coop- eration and valuable advices. I would also like to thank to my family for support. Declaration I hereby declare that the presented thesis is my own work and that I have cited all sources of information in accordance with the Guideline for adhering to ethical principles when elaborating an academic final thesis. I acknowledge that my thesis is subject to the rights and obligations stip- ulated by the Act No. 121/2000 Coll., the Copyright Act, as amended. In accordance with Article 46(6) of the Act, I hereby grant a nonexclusive au- thorization (license) to utilize this thesis, including any and all computer pro- grams incorporated therein or attached thereto and all corresponding docu- mentation (hereinafter collectively referred to as the \Work"), to any and all persons that wish to utilize the Work. Such persons are entitled to use the Work in any way (including for-profit purposes) that does not detract from its value. This authorization is not limited in terms of time, location and quan- tity. However, all persons that makes use of the above license shall be obliged to grant a license at least in the same scope as defined above with respect to each and every work that is created (wholly or in part) based on the Work, by modifying the Work, by combining the Work with another work, by including the Work in a collection of works or by adapting the Work (including trans- lation), and at the same time make available the source code of such work at least in a way and scope that are comparable to the way and scope in which the source code of the Work is made available.
    [Show full text]
  • Optimizing Ruby on Rails for Performance and Scalability
    DEGREE PROJECT IN COMPUTER SCIENCE 120 CREDITS, SECOND CYCLE STOCKHOLM, SWEDEN 2016 Optimizing Ruby on Rails for performance and scalability KIM PERSSON KTH ROYAL INSTITUTE OF TECHNOLOGY SCHOOL OF COMPUTER SCIENCE AND COMMUNICATION Optimizing Ruby on Rails for performance and scalability Optimering av Ruby on Rails för prestanda och skalbarhet KIM PERSSON [email protected] Degree project in Computer Science Master’s Programme Computer Science Supervisor: Stefano Markidis Examiner: Jens Lagergren Employer: Slagkryssaren AB February 2016 Abstract Web applications are becoming more and more popular as the bound- aries of what can be done in a browser are pushed forward. Ruby on Rails is a very popular web application framework for the Ruby pro- gramming language. Ruby on Rails allows for rapid prototyping and development of web applications but it suffers from performance prob- lems with large scale applications. This thesis focuses on optimization of a Ruby on Rails application to improve its performance. We performed three optimizations to a benchmark application that was developed for this project. First, we removed unnecessary modules from Ruby on Rails and optimized the database interaction with Active Record which is the default object re- lational mapping (ORM) in Ruby on Rails. It allows us to fetch and store models in the database without having to write database specific query code. These optimizations resulted in up to 36% decrease in ap- plication response time. Second, we implemented a caching mechanism for JavaScript Object Notation (JSON) representation of models in the optimized application. This second optimization resulted in a total of 96% response time decrease for one of the benchmarks.
    [Show full text]
  • Rubinius Rubini Us Rubini.Us Rubini.Us Rubini.Us Rubinius History and Design Goals
    Rubinius Rubini us Rubini.us rubini.us http:// rubini.us Rubinius http://godfat.org/slide/2008-12-21-rubinius.pdf History and Design Goals Architecture and Object Model History and Design Goals Architecture and Object Model Evan Phoenix February of 2006 RubySpec MSpec Engine Yard C VM Shotgun C VM Shotgun C++ VM CxxTest LLVM History and Design Goals Architecture and Object Model Reliable, Rock Solid Code Reliable, Rock Solid Code Full Test Coverage 健康 Clean, Readable Code Clean, Readable Code Little Lines in Each File Clean, Readable Code Macro, Code Generator, Rake Task Clean, Readable Code CMake Clean, Readable Code CMake Clean, Readable Code C++ Object to Ruby Object 1 to 1 Mapping 清新 健康 清新 Modern Techniques Modern Techniques Pluggable Garbage Collectors Modern Techniques Pluggable Garbage Collectors • Stop-and-Copy Modern Techniques Pluggable Garbage Collectors • Stop-and-Copy • Mark-and-Sweep Modern Techniques Optimizers Modern Techniques Git, Rake, LLVM Squeak the Smalltalk-80 Implementation Squeak Slang Squeak • Alan Kay • Dan Ingalls • Adele Goldberg Smalltalk Xerox PARC Smalltalk Object-Oriented (differ from Simula and C++) Smalltalk GUI Smalltalk MVC History and Design Goals Architecture and Object Model Real Machine C++ Virtual Machine Real Machine kernel/bootstrap C++ Virtual Machine Real Machine kernel/platform kernel/bootstrap C++ Virtual Machine Real Machine kernel/common kernel/platform kernel/bootstrap C++ Virtual Machine Real Machine kernel/delta kernel/common kernel/platform kernel/bootstrap C++ Virtual Machine Real
    [Show full text]
  • Debugging at Full Speed
    Debugging at Full Speed Chris Seaton Michael L. Van De Vanter Michael Haupt Oracle Labs Oracle Labs Oracle Labs University of Manchester michael.van.de.vanter [email protected] [email protected] @oracle.com ABSTRACT Ruby; D.3.4 [Programming Languages]: Processors| Debugging support for highly optimized execution environ- run-time environments, interpreters ments is notoriously difficult to implement. The Truffle/- Graal platform for implementing dynamic languages offers General Terms an opportunity to resolve the apparent trade-off between Design, Performance, Languages debugging and high performance. Truffle/Graal-implemented languages are expressed as ab- Keywords stract syntax tree (AST) interpreters. They enjoy competi- tive performance through platform support for type special- Truffle, deoptimization, virtual machines ization, partial evaluation, and dynamic optimization/deop- timization. A prototype debugger for Ruby, implemented 1. INTRODUCTION on this platform, demonstrates that basic debugging services Although debugging and code optimization are both es- can be implemented with modest effort and without signifi- sential to software development, their underlying technolo- cant impact on program performance. Prototyped function- gies typically conflict. Deploying them together usually de- ality includes breakpoints, both simple and conditional, at mands compromise in one or more of the following areas: lines and at local variable assignments. The debugger interacts with running programs by insert- • Performance: Static compilers
    [Show full text]
  • Specialising Dynamic Techniques for Implementing the Ruby Programming Language
    SPECIALISING DYNAMIC TECHNIQUES FOR IMPLEMENTING THE RUBY PROGRAMMING LANGUAGE A thesis submitted to the University of Manchester for the degree of Doctor of Philosophy in the Faculty of Engineering and Physical Sciences 2015 By Chris Seaton School of Computer Science This published copy of the thesis contains a couple of minor typographical corrections from the version deposited in the University of Manchester Library. [email protected] chrisseaton.com/phd 2 Contents List of Listings7 List of Tables9 List of Figures 11 Abstract 15 Declaration 17 Copyright 19 Acknowledgements 21 1 Introduction 23 1.1 Dynamic Programming Languages.................. 23 1.2 Idiomatic Ruby............................ 25 1.3 Research Questions.......................... 27 1.4 Implementation Work......................... 27 1.5 Contributions............................. 28 1.6 Publications.............................. 29 1.7 Thesis Structure............................ 31 2 Characteristics of Dynamic Languages 35 2.1 Ruby.................................. 35 2.2 Ruby on Rails............................. 36 2.3 Case Study: Idiomatic Ruby..................... 37 2.4 Summary............................... 49 3 3 Implementation of Dynamic Languages 51 3.1 Foundational Techniques....................... 51 3.2 Applied Techniques.......................... 59 3.3 Implementations of Ruby....................... 65 3.4 Parallelism and Concurrency..................... 72 3.5 Summary............................... 73 4 Evaluation Methodology 75 4.1 Evaluation Philosophy
    [Show full text]
  • Practical Partial Evaluation for High-Performance Dynamic Language Runtimes
    Practical Partial Evaluation for High-Performance Dynamic Language Runtimes Thomas Wurthinger¨ ∗ Christian Wimmer∗ Christian Humer∗ Andreas Woߨ ∗ Lukas Stadler∗ Chris Seaton∗ Gilles Duboscq∗ Doug Simon∗ Matthias Grimmery ∗ y Oracle Labs Institute for System Software, Johannes Kepler University Linz, Austria fthomas.wuerthinger, christian.wimmer, christian.humer, andreas.woess, lukas.stadler, chris.seaton, gilles.m.duboscq, [email protected] [email protected] Abstract was first implemented for the SELF language [23]: a multi- Most high-performance dynamic language virtual machines tier optimization system with adaptive optimization and de- duplicate language semantics in the interpreter, compiler, optimization. Multiple tiers increase the implementation and and runtime system, violating the principle to not repeat maintenance costs for a VM: In addition to a language- yourself. In contrast, we define languages solely by writ- specific optimizing compiler, a separate first-tier execution ing an interpreter. Compiled code is derived automatically system must be implemented [2, 4, 21]. Even though the using partial evaluation (the first Futamura projection). The complexity of an interpreter or a baseline compiler is lower interpreter performs specializations, e.g., augments the in- than the complexity of an optimizing compiler, implement- terpreted program with type information and profiling infor- ing them is far from trivial [45]. Additionally, they need to mation. Partial evaluation incorporates these specializations. be maintained and ported to new architectures. This makes partial evaluation practical in the context of dy- But more importantly, the semantics of a language need namic languages, because it reduces the size of the compiled to be implemented multiple times in different styles: For code while still compiling in all parts of an operation that are the first-tier interpreter or baseline compiler, language op- relevant for a particular program.
    [Show full text]
  • Web Development with Ruby on Rails
    Web development with Ruby on Rails Unit 3: Ruby Announcements Office Hours Mat Wednesdays 9am - 12pm Innovation Station #2, Weiss Tech House Jennifer Fridays 4p-5p 2nd Floor of Houston Hall David Thursdays, 8pm-9:30pm, Moore 100A Sundays, 11pm-12am, Dubois Computer Lab IRC matschaffer irc.freenode.net #philly.rb Sub on 10/3 Ruby Designed by Yukihiro Matsumoto (“Matz”) Interpreted OO language Sometimes described as a cross between Smalltalk and Perl Ruby Features Concise but readable Pure OO (no primitives) Dynamic typing (“Duck typing”) Functional programming (blocks/closures) Metaprogramming Ruby Intangibles Thriving ecosystem Maximizes developer “happiness” LOTS of discussion and opinion on this topic, e.g. this thread on Stack Overflow http://bit.ly/elegantruby Many Rubies Matz's Ruby Interpreter (MRI) JRuby Rubinius MacRuby MagLev mRuby Just Enough Ruby Syntax Statements # Separated by line breaks statement_one statement_two # Can use semicolon to put several # statements on one line statement_one; statement_two # Operator, comma or dot can be # followed by a line break my_name = "Mat " + "Schaffer" # Strings can contain # line breaks my_name = "Mat Schaffer" Data Types - No Primitives Constants, classes and modules PI MyClass MyModule Symbols :purple Strings "purple" Data Types (cont) Arrays ["one", 2, :four] Hashes 1.8 { :good => “four legs”, :bad => “two legs” } Hashes 1.9 {good:"four legs", bad:"two legs"} Numbers 100 3.14159 1_000_000 Strings Characters quoted by single-quotes (') or double- quotes (") Syntax "This is a String" Inline Ruby interpretation Double-quotes interpolate, single-quotes do not. Example irb> name = "Smith" irb> "Hello, #{name}!" => Hello, Smith! Symbols Like an immutable string More efficient, use single memory address Not interchangeable String "blue" Symbol :blue Jim Weirich says..
    [Show full text]
  • Ruby Benchmark Suite Using Docker 949
    Proceedings of the Federated Conference on DOI: 10.15439/2015F99 Computer Science and Information Systems pp. 947–952 ACSIS, Vol. 5 Ruby Benchmark Tool using Docker Richard Ludvigh, Tomáš Rebok Václav Tunka, Filip Nguyen Faculty of Informatics, Masaryk University Red Hat Czech, JBoss Middleware Botanická 68a, 60200, Brno, Czech Republic Purkynovaˇ 111, 61245 Brno, Czech Republic Email: [email protected], xrebok@fi.muni.cz Email: {vtunka,fnguyen}@redhat.com Abstract—The purpose of this paper is to introduce and on a baremetal and virtual server to provide results from both describe a new Ruby benchmarking tool. We will describe the environments. In section III-D, we describe both environments background of Ruby benchmarking and the advantages of the and their configuration in detail. new tool. The paper documents the benchmarking process as well as methods used to obtain results and run tests. To illustrate the The results we present are also available online. The results provided tool, results that were obtained by running a developed are in three main areas: benchmarking tool on existing and available official ruby bench- • MRI Versions overview - we have compared multiple marks are provided. These results document advantages in using MRI Ruby versions to determine the progress mainly in various Ruby compilers or Ruby implementations. memory usage as new MRI (2.2.0) has announced a new I. INTRODUCTION garbage collection algorithm. UBY IS A PURE OBJECT-ORIENTED interpreted lan- • A comparison of MRI compilers determined the differ- R guage. The language itself has three major implementa- ences in using different C compilers to compile Ruby tions: MRI written in C, JRuby written in Java, and Rubinius (2.2.0 used in benchmarks).
    [Show full text]
  • The Ruby Way: Solutions and Techniques in Ruby Programming
    Praise for The Ruby Way, Third Edition “Sticking to its tried and tested formula of cutting right to the techniques the modern day Rubyist needs to know, the latest edition of The Ruby Way keeps its strong reputation going for the latest generation of the Ruby language.” Peter Cooper Editor of Ruby Weekly “The authors’ excellent work and meticulous attention to detail continues in this lat- est update; this book remains an outstanding reference for the beginning Ruby pro- grammer—as well as the seasoned developer who needs a quick refresh on Ruby. Highly recommended for anyone interested in Ruby programming.” Kelvin Meeks Enterprise Architect Praise for Previous Editions of The Ruby Way “Among other things, this book excels at explaining metaprogramming, one of the most interesting aspects of Ruby. Many of the early ideas for Rails were inspired by the first edition, especially what is now Chapter 11. It puts you on a rollercoaster ride between ‘How could I use this?’ and ‘This is so cool!’ Once you get on that roller- coaster, there’s no turning back.” David Heinemeier Hansson Creator of Ruby on Rails, Founder at Basecamp “The appearance of the second edition of this classic book is an exciting event for Rubyists—and for lovers of superb technical writing in general. Hal Fulton brings a lively erudition and an engaging, lucid style to bear on a thorough and meticulously exact exposition of Ruby. You palpably feel the presence of a teacher who knows a tremendous amount and really wants to help you know it too.” David Alan Black Author of The Well-Grounded Rubyist “This is an excellent resource for gaining insight into how and why Ruby works.
    [Show full text]
  • Parallelization of Dynamic Languages: Synchronizing Built-In Collections
    Parallelization of Dynamic Languages: Synchronizing Built-in Collections BENOIT DALOZE, Johannes Kepler University Linz, Austria ARIE TAL, Technion, Israel STEFAN MARR, University of Kent, United Kingdom HANSPETER MÖSSENBÖCK, Johannes Kepler University Linz, Austria EREZ PETRANK, Technion, Israel Dynamic programming languages such as Python and Ruby are widely used, and much effort is spent on making them efficient. One substantial research effort in this direction is the enabling of parallel code execution. While there has been significant progress, making dynamic collections efficient, scalable, and thread-safe isan open issue. Typical programs in dynamic languages use few but versatile collection types. Such collections are an important ingredient of dynamic environments, but are difficult to make safe, efficient, and scalable. In this paper, we propose an approach for efficient and concurrent collections by gradually increasing synchronization levels according to the dynamic needs of each collection instance. Collections reachable only by a single thread have no synchronization, arrays accessed in bounds have minimal synchronization, and for the general case, we adopt the Layout Lock paradigm and extend its design with a lightweight version that fits the setting of dynamic languages. We apply our approach toRuby’s Array and Hash collections. Our experiments show that our approach has no overhead on single-threaded benchmarks, scales linearly for Array and Hash accesses, achieves the same scalability as Fortran and Java for classic parallel algorithms, and 108 scales better than other Ruby implementations on Ruby workloads. CCS Concepts: · Software and its engineering → Data types and structures; Concurrent program- ming structures; Dynamic compilers; Additional Key Words and Phrases: Dynamically-typed languages, Collections, Concurrency, Ruby, Truffle, Graal, Thread Safety ACM Reference Format: Benoit Daloze, Arie Tal, Stefan Marr, Hanspeter Mössenböck, and Erez Petrank.
    [Show full text]
  • Oracle® Big Data Appliance Licensing Information User Manual
    Oracle® Big Data Appliance Licensing Information User Manual Release 4 (4.14) F18123-01 April 2019 Oracle Big Data Appliance Licensing Information User Manual, Release 4 (4.14) F18123-01 Copyright © 2011, 2019, Oracle and/or its affiliates. All rights reserved. Primary Author: Frederick Kush This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your li‐ cense agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engi‐ neering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibit‐ ed. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, then the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-spe‐ cific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the pro‐ grams, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]