GithubHelp home page GithubHelp logo

mdesantis / rubystone Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 0.0 236 KB

Ruby porting of the Python PYSTONE script

Home Page: https://github.com/mdesantis/rubystone

License: MIT License

Ruby 100.00%
ruby benchmark-scripts

rubystone's Introduction

Description

This is the Ruby porting of the Python PYSTONE script. It provides a rough benchmark of the Ruby interpreter via the rubystone executable.

Installation

Install the gem:

gem install rubystone

Or clone the project:

git clone https://github.com/mdesantis/rubystone

Usage

Use the rubystone executable (bin/rubystone if you cloned the project)

Output examples

This are the outputs respective to MRI, JRuby and Rubinius interpreters on my machine (Intel(R) Core(TM) i7-2600K CPU @ 3.40GHz):

$ ruby -v
ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-linux]
$ rubystone
Rubystone 1.0.4 cold time for 50000 passes = 0.6164484
This machine benchmarks at 81109 cold rubystones/second
Rubystone 1.0.4 warm time for 50000 passes = 0.6284089
This machine benchmarks at 79566 warm rubystones/second

$ ruby -v
jruby 1.7.13 (2.0.0p195) 2014-06-24 43f133c on OpenJDK 64-Bit Server VM 1.7.0_55-b14 [linux-amd64]
$ rubystone
Rubystone 1.0.4 cold time for 50000 passes = 0.903
This machine benchmarks at 55370 cold rubystones/second
Rubystone 1.0.4 warm time for 50000 passes = 0.293
This machine benchmarks at 170648 warm rubystones/second

$ ruby -v
rubinius 2.2.10 (2.1.0 bf61ae2e 2014-06-27 JI) [x86_64-linux-gnu]
$ rubystone
Rubystone 1.0.4 cold time for 50000 passes = 0.689623
This machine benchmarks at 72503 cold rubystones/second
Rubystone 1.0.4 warm time for 50000 passes = 0.321823
This machine benchmarks at 155364 warm rubystones/second

Version

Ruby/1.0.4 (corresponds to Python/1.1 PYSTONE version)

Author

Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013.

Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness has been used, at the expense of C-ness.

Translated from C to Python by Guido van Rossum.

Translated from Python to Ruby by Maurizio De Santis.

Changes

The Ruby version runs two indentical benchmarks sequentially, the cold run and the warm run: the latter is intended for platforms with JIT compilation (JRuby, Rubinius).

Version History

1.0.3
Updating README
1.0.2
Updating of the script comment in order to reflect the README
1.0.1
Generating new gem
1.0
Porting of Python/1.1 PYSTONE version

References

PYSTONE 1.1

License

MIT

rubystone's People

Contributors

mdesantis avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.