Replies: 2 comments 2 replies
-
|
make sure you build "release". optimised compilation should be significantly faster. swift debug build is very slow |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
I run a quick test on my machine (M3 Air) and for 10_000_000 bytes. It's ~12ms that looks good at first glance. Feel free to run the same test on your end to compare output: func testSHA3Perf() {
let arr = Array<UInt8>(repeating: 0x01, count: 10_000_000)
measureMetrics([XCTPerformanceMetric.wallClockTime], automaticallyStartMeasuring: true) {
_ = SHA3(variant: .keccak256).calculate(for: arr)
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using hash function for photo and video files and it is very slow comparing to analogies in other programming languages like Javascript:
Is there any way to improve performance?
Beta Was this translation helpful? Give feedback.
All reactions