Giter Club home page Giter Club logo

neon_benchs's Introduction

ARM NEON benchmarks

This is simple and dumb benchmarks written to explore ARM CPUs performance.

It implements simple alpha blending for premultiplied pixels format using different techniques.

extern void
opSourceOver_premul(
    uint8_t* restrict Rrgba, const uint8_t* restrict Srgba,
    const uint8_t* restrict Drgba, size_t len)
{
    size_t i = 0;
    for (; i < len*4; i += 4) {
        uint8_t Sa = 255 - Srgba[i + 3];
        Rrgba[i + 0] = DIV255(Srgba[i + 0] * 255 + Drgba[i + 0] * Sa);
        Rrgba[i + 1] = DIV255(Srgba[i + 1] * 255 + Drgba[i + 1] * Sa);
        Rrgba[i + 2] = DIV255(Srgba[i + 2] * 255 + Drgba[i + 2] * Sa);
        Rrgba[i + 3] = DIV255(Srgba[i + 3] * 255 + Drgba[i + 3] * Sa);
    }
}

Runing

$ make

Run default benchmarks, which include not vectorized and auto vectorized variants.

$ make arm

Run benchmarks for ARM target, which include NEON optimized versions.

$ make x86

Run benchmarks for x86 target, which include SSE and AVX optimized versions.

$ CC='clang' make arm

Use different C compiler. Default compiler is cc.

$ CFLAGS='-O3' make arm

Use different compiler parameters. Default is -Wall -O2.

Meaning

Each test runs 4 times and each run contains of 100 000 calls of opSourceOver_premul function, which gives 100MPx picture in total. The results are given in seconds, so, for example, if result is 0.160 s, the speed of conversion is 100 / 0.16 = 625 MPx/s.

neon_benchs's People

Contributors

homm avatar

Stargazers

 avatar  avatar  avatar

Watchers

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