Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

5
LINES

< > BotCompany Repo | #1028950 // countOccurrences_optimizedForZero - now just a synonym of countOccurrences

JavaX fragment (include)

static int countOccurrences_optimizedForZero(S s, S x) {
  // The first line doesn't seem faster (and why should it)
  //ret !contains(s, x) ? 0 : countOccurrences(s, x);
  ret countOccurrences(s, x);
}

Author comment

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: 162 / 206
Version history: 3 change(s)
Referenced in: [show references]