Coder Social home page Coder Social logo

benchy's People

Contributors

lizmat avatar zoffixznet avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

benchy's Issues

"new" always comes out faster in Identical code runs

Got this:

use Benchy;
b 1000, { do(); say 'hello' },
     { do(); say 'hello' },
        { do(); } ;

sub do {
    return;
}

Get this:

Bare: 0.00074653s
Old:  0.004277664s
New:  0.00308324s
NEW version is 38% faster

Some more complicated code can say "New version is 5x faster" even though it's the same code.

Fix division by zero

zoffix@leliana~$ perl6 -MBenchy -e 'b 500000, {;}, {;}'
Bare: 0.1243830702788s
Old:  0s
New:  0.0080373593521098327s
Attempt to divide 0.00803735935210983 by zero using /
  in sub dif at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/78016467205BC2F8076A1E3313B1E46274603615 (Benchy) line 57
  in block  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/78016467205BC2F8076A1E3313B1E46274603615 (Benchy) line 65
  in sub b at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/78016467205BC2F8076A1E3313B1E46274603615 (Benchy) line 63
  in block <unit> at -e line 1

Actually thrown at:
  in sub dif at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/78016467205BC2F8076A1E3313B1E46274603615 (Benchy) line 58
  in block  at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/78016467205BC2F8076A1E3313B1E46274603615 (Benchy) line 65
  in sub b at /home/zoffix/.rakudobrew/moar-nom/install/share/perl6/site/sources/78016467205BC2F8076A1E3313B1E46274603615 (Benchy) line 63
  in block <unit> at -e line 1

zoffix@leliana~$ 

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.