Giter Club home page Giter Club logo

oop-4's Introduction

Custom C++ vector implememtation

Running benchmark

  • make
  • make run

Running unit tests (requires Googletest installed)

  • make test

Push_back benchmark

Benchmark: inserting 10000 elements
My vector: << 0 ms
STD vector: << 0 ms

Benchmark: inserting 100000 elements
My vector: << 1 ms
STD vector: << 0 ms

Benchmark: inserting 1000000 elements
My vector: << 8 ms
STD vector: << 7 ms

Benchmark: inserting 10000000 elements
My vector: << 94 ms
STD vector: << 100 ms

Benchmark: inserting 100000000 elements
My vector: << 964 ms
STD vector: << 869 ms

Reallocation benchmark

(This vector is using same growth method as g++ std::vector)

Benchmark: reallocations inserting 10000 elements
My vector: << 23
STD vector: << 23

Benchmark: reallocations inserting 100000 elements
My vector: << 29
STD vector: << 29

Benchmark: reallocations inserting 1000000 elements
My vector: << 34
STD vector: << 34

Benchmark: reallocations inserting 10000000 elements
My vector: << 40
STD vector: << 40

Benchmark: reallocations inserting 100000000 elements
My vector: << 46
STD vector: << 46

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.