1 | static int countOccurrences_optimizedForZero(S s, S x) { |
2 | // The first line doesn't seem faster (and why should it) |
3 | //ret !contains(s, x) ? 0 : countOccurrences(s, x); |
4 | ret countOccurrences(s, x); |
5 | } |
Began life as a copy of #1008879
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1028950 |
Snippet name: | countOccurrences_optimizedForZero - now just a synonym of countOccurrences |
Eternal ID of this version: | #1028950/4 |
Text MD5: | 26557e36bfe8a1124038e6a10c6920e5 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-07-12 20:33:53 |
Source code size: | 206 bytes / 5 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 232 / 278 |
Version history: | 3 change(s) |
Referenced in: | [show references] |