Skip to content

Add backend for 32 bit targets with wide multiplication? #133

Open
@newpavlov

Description

Currently polyval (and thus crates built on top of it) uses 32-bit soft backend which was written with targets without wide multiplication in mind. However, this code can be quite inefficient for targets which do support wide multiplication, such as:

  • WASM32: u32s can be extended to 64 bits and multiplied using i64.mul.
  • RISC-V: wide multiplication is implemented by combining MULHU and MUL operations (hardware may fuse them later into a single instruction).

Also it may be worth to add a soft backend for 64-bit targets without wide multiplication? Though right now I can't name a target for which it could be useful.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions