Coder Social home page Coder Social logo

dssgabriel / sve-string-routines-benchmarks Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 23.32 MB

Comparative performance benchmarks for hand-optimized Arm SVE implementations of C standard library string routines.

License: GNU Lesser General Public License v3.0

CMake 2.61% C 53.70% Assembly 31.02% Python 9.53% Shell 3.14%
arm64 string sve

sve-string-routines-benchmarks's Introduction

Comparative benchmarks for SVE-optimized string routines

About

This repository benchmarks the current implementations of some AArch64 SVE string routines from Arm's optimized-routines library against newly proposed implementations.

This effort was carried out as part of the EMOPASS French Project and conducted at the Laboratory of Parallel Networks and Distributed Algorithms (LI-PaRAD) of the University of Versailles Saint-Quentin-en-Yvelines (UVSQ โ€” Paris-Saclay University), in collaboration with industrial partners: SiPearl and Eviden.

In the context of benchmarking HPC applications on Arm Neoverse V1 microarchitectures (in particular the AWS Graviton3 and Graviton3E processors), we have shown that using INCx SVE instructions to increment the loop offset can introduce significant performance degradation. Instead, it is possible to replace this instruction with a combination of CNTx to retrieve the SVE register width in the loop prelude, and ADD to increment the loop offset accordingly. This change is only used in paths where the whole vector is known to be valid, i.e., when no elements in the register are masked through a predicate. Conveniently, this happens to be the critical path in most scenarios.

The benchmarks presented here show that this change never causes any performance regression compared to the current implementations in the ARM-software/optimized-routines repository. Moreover, some of the proposed implementations are competitive with their GNU libc counterparts, namely: strcpy, strncpy, strcmp and strncmp. Tests have been conducted on AWS Graviton3 and Graviton3E instances. Detailed results are presented in the Results section at the end of this README.

Build & run

Pre-requisites

  • Arm SVE enabled CPU
  • CMake 3.16+
  • C11 conforming compiler

Building

cmake -S . -B build
cmake --build build

By default, this will compile the code to compare against AOR implementations. You can enable comparison against GNU libc by passing -DCMP_LIBC to the CMAKE_C_FLAGS variable.

Running

All program options can be listed with the following command:

./build/bench-sve-string-routines --help

Run specific routines with their name as option. E.g. for strncmp and strcpy:

./build/bench-sve-string-routines --strncmp --strcpy

Results

Please check out the dedicated README in the results/ directory.

sve-string-routines-benchmarks's People

Contributors

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