-
Enhancement
-
Resolution: Unresolved
-
P4
-
25
-
x86_64
-
generic
The following micro incurs redundant call overhead for a trigonometric identity involving sin and inverse sin (arcsin) APIs for angles known at compile time.
public static double micro() {
return Math.sin(Math.asin(1.0)); // angle can be a constant b/w -1.0 and 1.0
}
arcsin(sin(x)) => x
arccos(cos(x)) => x
sin(arcsin(x) => x
cos(arccos(x) => x
Problem:
- Transcendental stubs calls are agnostic to idealizations.
Solution:
- Creation of idealizable macro nodes, which can be lowered to calls during macro expansion will save redundant call overheads.
public static double micro() {
return Math.sin(Math.asin(1.0)); // angle can be a constant b/w -1.0 and 1.0
}
arcsin(sin(x)) => x
arccos(cos(x)) => x
sin(arcsin(x) => x
cos(arccos(x) => x
Problem:
- Transcendental stubs calls are agnostic to idealizations.
Solution:
- Creation of idealizable macro nodes, which can be lowered to calls during macro expansion will save redundant call overheads.