[sldev] Optimization via _set_sbh_threshold

Dirk Moerenhout blakar at gmail.com
Wed Jun 13 04:17:16 PDT 2007


Nick,

note that only the second option on that page for activating LFH is
correct. The first one just sets up a SBH with a limit at 128 bytes.
While LFH uses 128 buckets that's not the same as being limited at 128
bytes.

Note that using a custom allocator like it is mentioned there might be
fun too :) But I doubt searching for the ideal library wouldn't yield
a lot (a lot beyond using either SBH or LFH that is).

Dirk aka Blakar Ogre

On 6/13/07, Nicholaz Beresford <nicholaz at blueflash.cc> wrote:
>
> Dirk,
>
>  > read this: http://msdn2.microsoft.com/En-US/library/aa366750.aspx
>  >
>  > As you can see the LFH covers this as it has 48 buckets of 128 for the
>  > sizes upto 512.
>  >
>  > The drawback of their decision to deprecate SBH is mostly that while
>  > SBH was a default in the past LFH is not. As a result the base
>  > performance has suddenly dropped for certain types of applications (if
>  > not all :) ) and you need to salvage that. As it's easier to find info
>  > on SBH than LFH many people still use it but it's not the future and I
>  > guess at some point it'll even disappear.
>
>
> I'm still not sure I understand the difference between the two, but
> this link below has two methods of speeding up things
>
> http://www.amanjit-gill.de/articles/vc7_stl.html
>
> and did not understand why there were two different ways
> of doing this.
>
> I'll dig a bit deeper along those lines.
>
> Thanks!
>
>
>
> Nick
>
>
>
>


More information about the SLDev mailing list