-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
From #32881 (comment):
Didn't we at some point explicitly state in the docs that it's a good-effort rough estimate and should not be relied upon? Or perhaps that was just a Jameson comment on GitHub that never got incorporated into the docs. In any case, it seems like we can improve the good-effort to best-effort in some places, and perhaps for the others we should document that it'll never be 100% perfect for the remainder.
While Base.summarysize
is being improved upon (e.g., see #54606), it's not 100% accurate. Some example issues:
- should
Base.summarysize
include alignment? #32881 - Base.summarysize misses null byte of String #54023
Base.summarysize(::Symbol)
returns zero #55549
I saw there's people advocating for a better sizeof
docstring (#54007). Do you think adding a note stating that summarysize
isn't to be relied upon (and, ideally, in which cases it is accurate) is worth the effort? IMO this isn't clear enough as things currently stand.