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 (40L/1K).

static bool eq(Object a, Object b) {
  return 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 20 computer(s): aoiabmzegqzx, ayivmpnvhhik, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ekrmjmnbrukm, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, jozkyjcghlvl, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, vujiipfktnfq, whxojlpjdney, 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/9
Text MD5: 4dd8572426b53bb6894fd80e1336bbe3
Transpilation MD5: f6088b0418699d936b1296077f602388
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-13 11:46:23
Source code size: 233 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 480 / 1287
Version history: 8 change(s)
Referenced in: [show references]

Formerly at &