Skip to content

System.Math and System.MathF should be implemented in managed code, rather than as FCALLs to the C runtime #9001

@tannergooding

Description

@tannergooding

As per the title, both System.Math and System.MathF should have most of their extern methods implemented in managed code rather than being FCALLs to the underlying C runtime.

This will ensure:

  • Consistency across operating systems and architectures
  • Implementations can be more readily updated without requiring changes in the runtime proper

Some of the functions (such as Abs, Ceil, Floor, Round, and Sqrt) are simple enough that they can be implemented in managed code today and still maintain the performance characteristics.

Other functions (such as Cos, Sin, and Tan) will need to wait until the hardware intrinsics proposal is more widely available (since maintaining perf numbers will require an implementation to call said intrinsics).

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-Metadesign-discussionOngoing discussion about design without consensustenet-compatibilityIncompatibility with previous versions or .NET Frameworktenet-performancePerformance related issue

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions