Home » Developing U++ » U++ Developers corner » New containers - naming
New containers - naming [message #38981] |
Sun, 03 February 2013 19:46 |
|
mirek
Messages: 13979 Registered: November 2005
|
Ultimate Member |
|
|
Hi,
in past weeks, I was working on a new container that will become a basis of couple of other containers.
The new container, which I have named 'InVector', excels at inserting or removing elements at arbitrary locations (trading this feature for somewhat slower operator[]).
It is so fast that it is possible to create 'std::set' equivalent (means, elements are added at UpperBound index, so that InVector stays sorted at all times and it has log(n) search of elements), which is quite superior to set (which is implemented with using binary trees). It is moderately faster and it consumes significantly less memory.
InVector thus makes possible to create a new set of containers, alike to 'Array, Index, VectorMap, ArrayMap', where instead of hashing binary search is used. Of course, hashing is still much faster, but the advantage of binary search is the ability to perform range searches. Also, it consumes less memory than hashing.
Now one small funny problem is how to name these new containers. My current state of mind is somehing like
InArray (Array counterpart)
Order (Index counterpart)
OrderVector (VectorMap counterpart)
OrderArray (ArrayMap counterpart)
Any better ideas?
Mirek
P.S.: InVector can be seen in sandbox/InVector, with tests and benchmarks...
[Updated on: Sun, 03 February 2013 19:47] Report message to a moderator
|
|
|
|
|
New containers - naming
By: mirek on Sun, 03 February 2013 19:46
|
|
|
Re: New containers - naming
|
|
|
Re: New containers - naming
By: mirek on Sun, 03 February 2013 21:17
|
|
|
Re: New containers - naming
By: navi on Sun, 03 February 2013 23:36
|
|
|
Re: New containers - naming
By: Didier on Mon, 04 February 2013 20:10
|
|
|
Re: New containers - naming
By: lectus on Mon, 04 February 2013 21:40
|
|
|
Re: New containers - naming
By: mdelfede on Tue, 05 February 2013 22:35
|
|
|
Re: New containers - naming
By: zsolt on Wed, 06 February 2013 00:10
|
|
|
Re: New containers - naming
By: mirek on Wed, 06 February 2013 07:56
|
|
|
Re: New containers - naming
By: zsolt on Wed, 06 February 2013 11:36
|
|
|
Re: New containers - naming
By: mirek on Wed, 06 February 2013 07:58
|
Goto Forum:
Current Time: Mon May 13 08:15:33 CEST 2024
Total time taken to generate the page: 0.02638 seconds
|