# riscv_memops **Repository Path**: itopen/riscv_memops ## Basic Information - **Project Name**: riscv_memops - **Description**: fork from https://github.com/avx/riscv_memops.git - **Primary Language**: Unknown - **License**: BSD-2-Clause - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-10-10 - **Last Updated**: 2024-10-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 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.