Boost logo

Boost :

Subject: Re: [boost] thread_specific_ptr prototype (was: Re: [thread] thread_specific_ptr performance)
From: Stefan Strasser (strasser_at_[hidden])
Date: 2010-01-13 09:28:35


Am Wednesday 13 January 2010 15:08:29 schrieben Sie:
> Am Tuesday 12 January 2010 21:39:16 schrieb vicente.botet:
> <<
> prototype::thread_specific_ptr<int> ptr;
> int f(){
> return *ptr;
> }
>
>
> <<
> _Z1fv:
> .LFB4216:
> pushl %ebp
> .LCFI26:
> movl %gs:_ZN5boost9prototype6detail10tss_vectorE_at_NTPOFF, %edx
> movl ptr+4, %eax
> movl %esp, %ebp
> .LCFI27:
> popl %ebp
> movl (%edx), %edx
> leal (%eax,%eax,2), %eax
> movl (%edx,%eax,4), %eax
> movl (%eax), %eax
> ret

one of the indirections could be removed by storing &vector[0] in the
thread-local storage instead of &vector.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk