Artifacts Associated With Ticket fd1585e2a1
Ticket change [a4ce5f6312] (rid 239263) by dgp on 2025-04-16 18:12:48:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
[677241c9b3] recently made changes to the internal utility routine TclLog2() seeking optimization and confident extension to 64-bit range. Conflicts encountered merging the changes to the dgp-refactor branch revealed that branch holds considerably more improvements ready to deploy. A new branch dgp-msb has been opened to bring those changes over to the trunk in a sequence of commits. When the whole revision is complete, I will be seeking review to approve accepting all the changes for merge to trunk and backport to appropriate branches.
- foundin initialized to: "9.0+"
- is_private initialized to: "0"
- login: "dgp"
- priority initialized to: "5 Medium"
- private_contact initialized to: "8e2300e85be5dd1445b9666eb9429055951e33be"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "dgp"
- subsystem initialized to: "69. Other"
- title initialized to:
Continued improvements to TclLog2() and friends and callers
- type initialized to: "Patch"
Ticket change [c34b22d88b] (rid 239526) by dgp on 2025-04-23 18:40:46:
- icomment:
The dgp-msb branch is ready for an independent review of suitability to merge to trunk.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [119fdfe810] (rid 239661) by dgp on 2025-05-01 17:04:41:
- icomment: "Anyone willing to look?"
- login: "dgp"
- mimetype: "text/plain"
Ticket change [6a15f5405c] (rid 239662) by oehhar on 2025-05-01 20:04:20:
- icomment:
Dopnald, this is clear wizard work. I even have no idea of the purpose. There are assembler intrinsics etc. No way for me, sorry. Take care, Harald
- login: "oehhar"
- mimetype: "text/x-fossil-wiki"
- username: "oehhar"
- icomment:
Ticket change [adaa52e3a3] (rid 239683) by jan.nijtmans on 2025-05-02 08:42:16:
- icomment:
I like the idea (and the implementation looks good) I scheduled a build tonight, let's see what Github ACTIONS thinks.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- icomment:
Ticket change [925376ffa2] (rid 239761) by jan.nijtmans on 2025-05-04 17:12:09:
- assignee changed to: "dgp"
- icomment:
The testcases show this: <pre> ==== brodnik-1.0 TclMSB correctness FAILED ==== Contents of test case: testmsb $v ---- Result was: -1 ---- Result should have been (exact matching): 0 ==== brodnik-1.0 FAILED </pre> Same failure on all platforms - login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
Ticket change [7e5e07b6db] (rid 239783) by dgp on 2025-05-05 11:19:49:
- icomment:
All platforms except mine I guess. Will look into it.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [984c8b5da4] (rid 239789) by dgp on 2025-05-05 11:45:24:
- icomment:
Have to take care at the input range boundaries to not be testing undefined behaviors. Thanks! Should be better now.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [8089a3f95c] (rid 239838) by dgp on 2025-05-05 19:37:41:
- icomment:
Answering question about the non-support for an input of 0 to TclMSB(). Since the binary representation of 0 has no set bits, it is unclear what the correct answer should be to the question what is the index of the most significant set bit. A return value of 0 is effectively an assertion that the input value 0 is no different from the input value 1. Far from clear that's an acceptable equivalence to all callers. A return value of -1 succeeds in treating an input value 0 as something unlike any other input. However, most known callers of TclMSB() have the intent of using the return value as an index, and a negative index is not usually welcome. Such callers would need to post-process the return value to treat -1 differently. This is no better than expecting the caller to treat an input value of 0 differently before making the TclMSB() call. Either way, there's a testing branch needed if the caller knows a value of 0 is a possibility. FWIW, it is also true that this unsupported input value reflects the same unsupported input value in the most efficient implementations. The limitations of clzll(), etc. are just showing through.
- login: "dgp"
- mimetype: "text/plain"
- icomment:
Ticket change [fc1aad6f51] (rid 239951) by dgp on 2025-05-09 18:14:00:
- closedate changed to: "2460805.25973016"
- closer changed to: "dgp"
- icomment:
Accepted into 9.0 and 9.1 development.
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Accepted"
- status changed to: "Closed"