RustCrypto / RustCrypto/crypto-bigint

AVX IFMA Accelerated `split_mul`

Open
#885 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
309
Forks
95
Avg merge
1d 14h
Merged PRs (30d)
3

Description

I prototyped a portable split_mul implementation premised on using the AVX IFMA instructions to accelerate itself. I believe I optimized it decently, the code is well-documented, the benchmark is easy to run, and the README explains the challenges moving forward. Unfortunately, despite observing a 20-40% improvement when compiled exclusively for the native CPU, I was unable to see any real-world performance benefit when I patched my crypto-bigint dependency to a fork which used this split_mul implementation when reasonable.

https://github.com/kayabaNerve/avx-ifma-mul

I'd love to see further discussion and potential upstreaming (again, as explained in the README). I would have entirely made this an issue if I did not want to provide the implementation + benchmark as an artifact (hence the repository).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked avx-ifma-mul repository, reading its README and running its benchmark to understand the proposed split_mul implementation and reported results. Then inspect how crypto-bigint currently implements split_mul and assess whether the prototype can be evaluated for upstreaming, with real-world performance impact established before considering the work done.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.