Libraryless. Click here for Pure Java version (11490L/66K).
1 | svoid bench_maskDiffing_justTheBitOp() { |
2 | int maskSize = 32; |
3 | L<long[]> images = repF(1000, -> new Image2BAsLongs(randomBinaryImage(maskSize)).pixels); |
4 | long[] mainImage = random(images); |
5 | print(benchFor5(-> { |
6 | long sum = 0; |
7 | for (image : images) |
8 | sum += countDifferingBits(image, mainImage); |
9 | ret sum; |
10 | })); |
11 | } |
Began life as a copy of #1036046
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1036048 |
Snippet name: | bench_maskDiffing_justTheBitOp |
Eternal ID of this version: | #1036048/1 |
Text MD5: | d5e117cfe1a00844c6332e77766bae08 |
Transpilation MD5: | d70515dd35eee319fc9ce31d673e3d02 |
Author: | stefan |
Category: | javax / imaging |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-09-03 01:47:30 |
Source code size: | 339 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 127 / 173 |
Referenced in: | [show references] |