Skip to content
Tcl Source Code Artifact [e1b313d9f5]
Login

Artifact [e1b313d9f5]

Artifact e1b313d9f54f625d3eb17e2e6bbd8a854d64bf772a85daabaf977f79a5bffa15:

Ticket change [e1b313d9f5] - Ticket [8dd2807066d7cc4d|8dd2807066] <i>bug in single-argument &#39;max&#39; with bignums</i> status still Closed with 5 other changes by sebres on 2025-11-13 11:48:46.
D 2025-11-13T11:48:46.616
J closedate 2460992.9922062
J closer sebres
J icomment <blockquote>>\sI\scan\simagine\sa\spossibility\sthat\sif\san\sexisting\sallocation\sfrom\sa\sprevious\scall\sis\stoo\sbig\sfor\sa\ssmaller\sbignum,\sit\sis\sreallocated</blockquote>\r\n\r\nYes,\sbut\sit'd\sbe\sthe\spointer\sstored\sin\smp_int::dp,\sso\squasi\spointer\sin\spointer\s(of\sptr1/ptr2),\swhereas\sptr1/ptr2\sthemselves\salways\spoint\sto\sthe\ssame\saddress\sin\sTSD\s(per\sthread).\r\n\r\n<blockquote>>\sIn\swhich\scase\sptr1\smay\sbe\s!=\sptr2\sbut\sno\slonger\seven\spoints\sto\svalid\sstorage.</blockquote>\r\n\r\nNo,\sit\scannot.\sTSD\sis\sallocated\sonce\sper\sthread\sand\sremains\sunchanged\sfor\severy\sstatic\sanchor.\r\nIf\sGetNumberFromObj\sreturned\sdifferent\spointers\sone\sof\sthem\sis\snot\sa\sbignum,\sif\sthey\sare\sequal\s-\sboth\sare\sbignum\sand\sthe\slast\swin.\r\n\r\nThis\svariant\s(well,\sa\sbit\smore\scomplex)\sworks\son\smy\sside\salready\sdozen\syears\swithout\sany\sissue.\sHowever\sI\sthink\sit'd\sbe\sbetter\sto\sbackport\smore\sfrom\sthere,\se.\sg.\syet\sanother\sGetNumberFromObj\sto\savoid\sgetting\sbignum\sin\sTSD\s(just\sa\sperformance\sthing)\sand\sthen\sone\scould\salways\suse\sTclUnpackBignum\sfor\slocal\svariable\sfor\sany\sconstant\saccesses\sto\sbignum\stype.\sThis\sway\sone\scould\seliminate\salmost\severy\sTcl_GetBignumFromObj/Tcl_TakeBignumFromObj\sinvocation\sand\simprove\sthe\sperformance\sdrastically.
J login sebres
J mimetype text/x-fossil-wiki
K 8dd2807066d7cc4d8604164f39b7f0d65c0dc321
U sebres
Z 763d8229c6472cf585878502b1ef42b9