Skip to content

Commit 40c5076

Browse files
committed
bench: remove custom sincos and use built-in julia implementation
--- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: na - task: lint_typescript_tests status: na - task: lint_license_headers status: passed ---
1 parent c5a083f commit 40c5076

File tree

1 file changed

+1
-20
lines changed
  • lib/node_modules/@stdlib/math/base/special/sincos/benchmark/julia

1 file changed

+1
-20
lines changed

lib/node_modules/@stdlib/math/base/special/sincos/benchmark/julia/benchmark.jl

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,25 +89,6 @@ function print_results( iterations, elapsed )
8989
@printf( " ...\n" );
9090
end
9191

92-
"""
93-
sincos( x )
94-
95-
Compute the sine and cosine of a number (since sincos is not directly exposed in julia).
96-
97-
# Arguments
98-
99-
* `x`: argument, in radians
100-
101-
# Examples
102-
103-
``` julia
104-
julia> sincos( 0.0 )
105-
```
106-
"""
107-
function sincos( x )
108-
[ sin( x ), cos( x ) ];
109-
end
110-
11192
"""
11293
benchmark()
11394
@@ -126,7 +107,7 @@ julia> out = benchmark();
126107
```
127108
"""
128109
function benchmark()
129-
t = BenchmarkTools.@benchmark $sincos( (20.0*rand()) - 10.0 ) samples=1e6
110+
t = BenchmarkTools.@benchmark sincos( (20.0*rand()) - 10.0 ) samples=1e6
130111

131112
# Compute the total "elapsed" time and convert from nanoseconds to seconds:
132113
s = sum( t.times ) / 1.0e9;

0 commit comments

Comments
 (0)