Giter VIP home page Giter VIP logo

zp_eliminator's Introduction

Zp elimination

A library of fast operations in Zp fields.

Main ideas:

Scalar stats

Unexpectedly, these techniques allow to get 20..50% improvements even in scalar code:

2021-10-03T14:42:59+03:00
Running ./zp_benchmarks
Run on (8 X 4150.71 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x4)
  L1 Instruction 32 KiB (x4)
  L2 Unified 256 KiB (x4)
  L3 Unified 8192 KiB (x1)
Load Average: 0.28, 0.27, 0.55
--------------------------------------------------------------------------------
Benchmark                                      Time             CPU   Iterations
--------------------------------------------------------------------------------
Z32749_Plus<PlusMinusAlgo::Explicit>     1009669 ns      1009208 ns          681
Z32749_Plus<PlusMinusAlgo::CondSub>       577953 ns       577731 ns         1208
Z32749_Minus<PlusMinusAlgo::Explicit>    1124633 ns      1124191 ns          621
Z32749_Minus<PlusMinusAlgo::CondSub>      581121 ns       580860 ns         1206
Z32749_Mul<MulAlgo::Explicit>             991529 ns       991019 ns          710
Z32749_Mul<MulAlgo::MulShift>             762371 ns       762054 ns          920
Z32749_Mul<MulAlgo::MulShiftDirect>       760021 ns       759697 ns          923

Vector stats

AVX2 vectorization results:

2021-10-03T22:05:47+03:00
Running ./zp_benchmarks
Run on (8 X 4109.52 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x4)
  L1 Instruction 32 KiB (x4)
  L2 Unified 256 KiB (x4)
  L3 Unified 8192 KiB (x1)
Load Average: 2.17, 1.81, 1.49
--------------------------------------------------------------------------------
Benchmark                                      Time             CPU   Iterations
--------------------------------------------------------------------------------
Z32749_Plus<PlusMinusAlgo::CondSub>       572376 ns       572184 ns        24437
Z32749_PlusVec                            117182 ns       117091 ns       119402
Z32749_Minus<PlusMinusAlgo::CondSub>      572212 ns       572029 ns        24421
Z32749_MinusVec                           114040 ns       113952 ns       122636

zp_eliminator's People

Contributors

dmitriykorchemkin avatar

Watchers

 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.