Skip to content

Optimize NativeMath/NativeMathf to use WASM builtins where beneficial #59

@dcodeIO

Description

@dcodeIO

For example:

  • There are some places where it appears to make sense to use the copysign instruction instead of using a branch (might need a benchmark)
  • JavaScript's Math.round always rounds exact fractions of 0.5 towards +Infinity, even if negative, and the code currently uses a branch for that.
  • Possibly quite a few more things I haven't yet thought of.

See: std/assembly/math.ts

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions