Home » Developing U++ » U++ Developers corner » A new container in works: Flex - fast insertion vector
Re: A new container in works: Flex - fast insertion vector [message #11684 is a reply to message #11683] |
Fri, 21 September 2007 14:30 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
sergei wrote on Fri, 21 September 2007 07:51 | When I said sorted containers what I needed is not find/unique (hash could do that too), but to iterate over all elements, from smallest ro largest / reverse. You say operator[] is slow. Would such iteration be slower than in set, or not?
|
Not actually measured, but iterating through link structures tends to be slow with modern CPUs, so I would say that the linear iteration would be about the same.
That said, it is a bit surprising that you would prefer sorted container only to get items in order. Using Index (or generally a hash_map) and Sorting the result beats this in most cases.
For me, the main advantage of such container would be the lower and upper bounds.
Quote: |
I don't know how allocators work, but what have you done to get it faster than default? Some kind of buffering to allocate once for several small elements?
|
The algorithm of latest U++ allocator is described in the Core/srcimp.tpp.
Mirek
|
|
|
|
|
A new container in works: Flex - fast insertion vector
By: mirek on Wed, 29 August 2007 19:00
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: unodgs on Wed, 29 August 2007 21:13
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: mirek on Wed, 29 August 2007 22:22
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: nasos_i on Thu, 20 September 2007 23:02
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: mirek on Thu, 20 September 2007 23:19
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: sergei on Fri, 21 September 2007 00:44
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: mirek on Fri, 21 September 2007 01:34
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: sergei on Fri, 21 September 2007 01:52
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: mirek on Fri, 21 September 2007 09:00
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: sergei on Fri, 21 September 2007 13:51
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: mirek on Fri, 21 September 2007 14:30
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: sergei on Fri, 21 September 2007 14:51
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: mirek on Fri, 21 September 2007 15:06
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: sergei on Fri, 21 September 2007 15:17
|
|
|
Re: A new container in works: Flex - fast insertion vector
By: mirek on Fri, 21 September 2007 16:36
|
Goto Forum:
Current Time: Sun May 19 12:44:19 CEST 2024
Total time taken to generate the page: 0.00966 seconds
|