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


< > 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).

sbool eq(O a, O b) {
  ret a == b || a != null && b != null && a.equals(b);

ifclass Symbol
// a little kludge for stuff like eq(symbol, "$X")
static bool eq(Symbol a, S b) {
  ret eq(str(a), b);

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: 820 / 1806
Version history: 9 change(s)
Referenced in: [show references]