Giter VIP home page Giter VIP logo

bitvec-perf-regression's Introduction

bitvec-perf-regression

Quick'n'dirty attemp to reproduce rust-lang/rust#79246

Introduction

This small crate goal is to measure number of retired instructions when doing a call to BitVec::extend in a similar way to what has been observed in the previously mentionned issue.

Instructions

First, let's build the crate:

$ cargo build --release

Then, let's run the example:

$ setarch x86_64 -R nice -20 taskset -c 3,7 cargo run --release

Why not using cargo directly? Because those tools help improve reproducibility of results:

  • setarch x86_64 -R disables ASLR.
  • nice -20 sets the highest scheduling priority.
  • tasket -c 3,7 selects a specific physical core to run and should prevent migration to another core. Use appropriate values on your machine. See /proc/cpuinfo for more information.

Results

On my machine, a Lenovo ThinkPad T480s with an Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz CPU, the results are as follow:

  • rust 1.47.0:
instructions:u = 1012840155
  • rust 1.48.0:
instructions:u = 1732620218

That's a performance regression of about 71%.

rust bisection

Bisection fails to complete but it seems that the regression was introduced in nightly-2020-09-02:

********************************************************************************
Regression in nightly-2020-09-02
********************************************************************************

fetching https://static.rust-lang.org/dist/2020-09-01/channel-rust-nightly-git-commit-hash.txt
ERROR: Tarball not found at https://static.rust-lang.org/dist/2020-09-01/channel-rust-nightly-git-commit-hash.txt

A previous bisection on a closed-source codebase pointed to nightly-2020-09-04 and to that pull-request: rust-lang/rust#70793 Not sure at this point why bisection found 2 differents nightly.

bitvec bisection

Using only rust 1.48.0, bisection showed that the regression:

  • was triggered when using version 0.17.4
  • was not triggered when using version 0.18.0

Further (manual) commit-by-commit bisection shows that the regression was not triggered starting with commit https://github.com/myrrlyn/bitvec/commit/f82112243707923a380e5091deab51c29b4f2948 which is basically a rewrite of the bitvec crate.

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.