Coder Social home page Coder Social logo

avx / riscv_memops Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 12 KB

risc-v optimized memset, memcpy, memmove implementations

License: BSD 2-Clause "Simplified" License

Makefile 7.12% Assembly 64.85% C 28.03%
memcpy memmove memset riscv risc-v rv32e rv64gc

riscv_memops's Introduction

risc-v memcpy, memset, memmove functions

Optimized memcpy, memset, memmove functions written in RISC-V assembler. Everyone wants to reduce the size of the code, so in order to comply with the compressed ISA specification, here preferably s0-s1, a0-a5 registers are used.

Minimal supported risc-v ISA: rv32e

code size

rv64gc: memset: 188 bytes, memcpy: 188 bytes, memmove: 266 bytes (324 with lh/sh)

performance

  • rv64: memcpy(page1, page2, 4096) => 1178 instructions; 3.477 bytes per ins. (tends to 3.66)
  • rv64: memset(page, 0, 4096) => 574 instructions; 7.13 bytes per ins. (tends to 7.31)
  • memmove: 5 instructions per load/store LEN where LEN is depend on the mutual alignment of src/dst.

riscv_memops's People

Contributors

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