Skip to content

[SR-2045] Optimization of FloatingPoint .round for Float/Double/Float80 #44654

@stephentyrone

Description

@stephentyrone
Previous ID SR-2045
Radar None
Original Reporter @stephentyrone
Type Improvement
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Standard Library
Labels Improvement
Assignee @stephentyrone
Priority Medium

md5: 087779091399356b02a215851a43df40

Issue Description:

These functions contain an extra layer of indirection as currently implemented; they call e.g. `_swift_stdlib_ceilf( )`, which turns around and either calls `ceilf( )` or contains a lowering of `ceilf( )` (arm64).

This extra overhead is especially significant for these functions in particular because they have single-instruction implementations for `Float` and `Double` on arm64 and x86. We're eating a function call where we should simply have a single instruction instead.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions