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

10
LINES

< > BotCompany Repo | #1007768 // faster eq function (if you never compare a BigInt to an Int or Long), LIVE

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (41L/1K).

1  
sbool eq(O a, O b) {
2  
  ret a == b || a != null && b != null && a.equals(b);
3  
}
4  
5  
ifclass Symbol
6  
// a little kludge for stuff like eq(symbol, "$X")
7  
static bool eq(Symbol a, S b) {
8  
  ret eq(str(a), b);
9  
}
10  
endif

Author comment

Began life as a copy of #1001026

download  show line numbers  debug dex  old transpilations   

Travelled to 22 computer(s): aoiabmzegqzx, ayivmpnvhhik, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, jozkyjcghlvl, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, vujiipfktnfq, whxojlpjdney, wnsclhtenguj, xrpafgyirdlv

No comments. add comment

Snippet ID: #1007768
Snippet name: faster eq function (if you never compare a BigInt to an Int or Long), LIVE
Eternal ID of this version: #1007768/10
Text MD5: e0485c532e368b686af05fb7bf6ebe99
Transpilation MD5: 2c5a15a5298e256dda577b159b0a5d29
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-07 07:06:46
Source code size: 214 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 781 / 1754
Version history: 9 change(s)
Referenced in: [show references]