GithubHelp home page GithubHelp logo

simd's Introduction

Full hardware spec

https://linux-hardware.org/?probe=dfa95a4efd

VM version

JDK 16.0.1, OpenJDK 64-Bit Server VM, 16.0.1+9-Ubuntu-120.04

Task

The task is to check, whether an intersection between two sorted arrays. Examples:

[1, 3, 4] and [2, 3, 5] => returns true

[2, 3, 4] and [1, 8, 10] => returns false

How to build/run?

mvn clean install -DskipTests=true
/usr/lib/jvm/java-16-openjdk-amd64/bin/java --enable-preview --add-modules=jdk.incubator.vector -jar target/FunMicro-benchmarks.jar NoIntersectionBenchmark

Benchmarks

No intersection between the arrays (worst case)

Benchmark                                                  Mode  Cnt  Score   Error   Units
NoIntersectionBenchmark.hasNoIntersectionScalar           thrpt   10  2.093 ± 0.032  ops/us
NoIntersectionBenchmark.hasNoIntersectionVector           thrpt   10  3.686 ± 0.027  ops/us
NoIntersectionBenchmark.hasNoIntersectionVectorShuffling  thrpt   10  2.902 ± 0.023  ops/us    

An intersection in the middle of the arrays

Benchmark                                                Mode  Cnt  Score   Error   Units
IntersectionOnTheMiddleBenchmark.hasIntersectionScalar     thrpt   10    3.713 ± 0.047  ops/us
IntersectionOnTheMiddleBenchmark.hasIntersectionVector     thrpt   10    7.699 ± 0.058  ops/us

An intersection in the beginning of the arrays

Benchmark                                                   Mode  Cnt    Score   Error   Units
IntersectionOnTheBeginningBenchmark.hasIntersectionScalar  thrpt   10   73.128 ± 0.353  ops/us
IntersectionOnTheBeginningBenchmark.hasIntersectionVector  thrpt   10  118.864 ± 1.463  ops/us

simd's People

Contributors

sherman avatar

Watchers

 avatar James Cloos 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.