Libraryless. Click here for Pure Java version (11495L/66K).
svoid bench_maskDiffing_justTheBitOp_fixedSize() { int maskSize = 32; L<long[]> images = repF(1000, -> new Image2BAsLongs(randomBinaryImage(maskSize)).pixels); long[] mainImage = random(images); int maskArraySize = l(mainImage); long[] bigArray = concatLongArrays(images); print(benchFor5(-> { long sum = 0; for (int i = 0; i < bigArray.length; i += maskArraySize) sum += countDifferingBits_1024bit(mainImage, bigArray, i); ret sum; })); }
Began life as a copy of #1036050
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): elmgxqgtpvxh, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1036055 |
Snippet name: | bench_maskDiffing_justTheBitOp_fixedSize (is it faster when we know how big the mask is? a little bit) |
Eternal ID of this version: | #1036055/1 |
Text MD5: | 906609e6caa278ff5e8de6c0471f42f4 |
Transpilation MD5: | eefba2b2acb0c3d38a41259d5c10f549 |
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 02:10:20 |
Source code size: | 485 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 114 / 164 |
Referenced in: | [show references] |