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)

static bool eq(Object a, Object b) {
  ret a == b || (a == null ? b == 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);
}
endif

Author comment

Began life as a copy of #1001026

download  show line numbers  debug dex   

Travelled to 14 computer(s): aoiabmzegqzx, ayivmpnvhhik, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, jozkyjcghlvl, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz, vujiipfktnfq, whxojlpjdney

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/8
Text MD5: 6e7466334107d655c6e5bdc91aaab1b6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-26 19:40:21
Source code size: 243 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 302 / 986
Version history: 7 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1007768 & http://1007768.tinybrain.de