<i>bug in single-argument 'max' with bignums</i> status still Closed with 5 other changes
by
.
D 2025-11-12T22:08:55.160
J closedate 2460992.42286065
J closer sebres
J icomment [780d2f3375e35f2c]\sillustrates\swhat\sI\smeant\swith\sunneeded\sCoR\s(copy\son\sread)...\r\nThis\simproves\s<code>TclCompareTwoNumbers</code>\sby\susage\sof\sinternal\srepresentation\sof\sbignum\srepresentations\sof\sobjects\sduring\scopmpare\sprocess\swithout\sto\scopy/free\sthem.\r\n\r\nAdditionally\sit\sis\salso\s4x\sfaster\sthan\swith\sa\scopy:\r\n<code><pre>\r\n\s\s%\sapply\s{{}\s{\sset\sx\s[expr\s2**64];\sset\sy\s[expr\s2**65];\stimerate\s{\sexpr\s{$x\s<\s$y}\s}\s}}\r\n<b\sstyle="color:red">-\s0.235482\sµs/#\s3729340\s#\s4246611\s#/sec\s878.192\snet-ms</b>\r\n<b\sstyle="color:green">+\s0.061164\sµs/#\s10849804\s#\s16349472\s#/sec\s663.618\snet-ms</b>\r\n\s\s%\sapply\s{{}\s{\sset\sx\s[expr\s2**64];\sset\sy\s[expr\s2**65];\stimerate\s{\sexpr\s{max($x,$y,$x,$y)}\s}\s}}\r\n<b\sstyle="color:red">-\s0.970795\sµs/#\s996554\s#\s1030083\s#/sec\s967.450\snet-ms</b>\r\n<b\sstyle="color:green">+\s0.216824\sµs/#\s4035058\s#\s4612032\s#/sec\s874.898\snet-ms</b>\r\n</pre></code>\r\n\r\nI'd\slike\sto\smerge\sit\slater\sif\sno\sobjections\sfollow.
J login sebres
J mimetype text/x-fossil-wiki
K 8dd2807066d7cc4d8604164f39b7f0d65c0dc321
U sebres
Z ba0d6ecc171a4609c6b68dc4029b2e8a