Re: Wouldn't it be nice to have a [binary set] command ?



On Mon, 28 Jan 2008 16:51:36 -0800 (PST),
"Donal K. Fellows" <donal.k.fellows@xxxxxxxxx> wrote:

Fredderic wrote:
If you work this out in terms of TCL's internal storage, that's
10-12 distinct entities per record, at a rough 40b per Tcl_Obj,
On a 32-bit system, it's 24 bytes per Tcl_Obj, assuming no sharing
(it's actually exactly 6 machine words). The additional overhead per
object due to memory allocation is very low (sub-byte after
amortization).

*nods* I was talking about 32-bit architectures, and I was ignoring
allocation overhead of the Tcl_Obj's for that exact reason.

I may have been a little overzealous in my estimation, though I was
allowing for a minimal string rep, also, which has its own overheads,
and at least a few characters. I suspect if I took an average, that
estimate is actually on the small side. My appologies if I didn't make
that obvious.


Fredderic
.



Relevant Pages

  • Re: Pimpl idiom without dynamic memory allocation
    ... (pimpl), without the overhead of dynamic memory allocation. ... LineImpl temporary will be destroyed at the ...
    (microsoft.public.vc.language)
  • Re: Passing multiple arguments to a thread
    ... > synchronize both threads... ... > There are so many way to go along like mutex, semaphores, critical ... The overhead of memory allocation is infinitesimal compared with the ...
    (microsoft.public.win32.programmer.kernel)