Last active
December 8, 2022 22:27
-
-
Save niczky12/1ac34ad2d176e768fa5552e5874f9139 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BenchmarkTools | |
# benchmarking single thread performance | |
N = 10_000 | |
# 8.167 μs | |
@btime sum(ismultiple12.(1:N)) | |
# without boradcasting, even faster! | |
# 5.800 μs | |
@btime sum(ismultiple12, 1:N) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment