[webkit-dev] [Block Pointer] Deterministic Region Based Memory Manager
Phil Bouchard
philippeb8 at gmail.com
Fri Mar 11 18:56:45 PST 2016
On 03/06/2016 10:57 PM, Phil Bouchard wrote:
>
> True but if block_ptr<> is 10x faster than the Mark & Sweep GC then I
> think we got something perhaps worth investigating.
- For the record, now block_ptr<> is 600% times faster than shared_ptr<>
so it's a good start:
new:
auto_ptr: 23174753 ns
shared_ptr: 49726615 ns
block_ptr: 7812659 ns
- I made the proxy explicit. Now it can be used 3 different ways:
1) Clothesline style:
block_proxy x;
block_ptr<int> v = block_ptr<int>(x, new block<int>(11));
block_ptr<int> w = block_ptr<int>(x, new block<int>(12));
2) Root style:
proxy_ptr<char[9]> u = proxy_ptr<char[9]>(new block<char[9]>());
3) Container style (very easy to write containers now):
struct list : block_proxy {
public:
list() : root(*this) {}
[...]
private:
block_ptr<node> root;
};
- I removed the capacity to unify sets. Why? Because it's faster &
cleaner without it. But I can add it back.
- Once again all the examples can be found here:
https://github.com/philippeb8/block_ptr/tree/master/example
- And the pointer itself here:
https://github.com/philippeb8/block_ptr/blob/master/include/boost/smart_ptr/block_ptr.hpp
Regards,
-Phil
More information about the webkit-dev
mailing list