Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-30 Thread Richard Guenther
On Mon, Jul 30, 2012 at 5:05 PM, Steven Bosscher wrote: > On Mon, Jul 30, 2012 at 4:53 PM, Richard Guenther > wrote: >> No, but less space efficient and of comparable speed as sbitmap which >> is also O(1). > > But iterating an sbitmap has worse complexity than sparseset. Which is why I mentione

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-30 Thread Richard Guenther
On Mon, Jul 30, 2012 at 5:14 PM, Richard Guenther wrote: > On Mon, Jul 30, 2012 at 5:05 PM, Steven Bosscher > wrote: >> On Mon, Jul 30, 2012 at 4:53 PM, Richard Guenther >> wrote: >>> No, but less space efficient and of comparable speed as sbitmap which >>> is also O(1). >> >> But iterating an

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-30 Thread Steven Bosscher
On Mon, Jul 30, 2012 at 4:53 PM, Richard Guenther wrote: > No, but less space efficient and of comparable speed as sbitmap which > is also O(1). But iterating an sbitmap has worse complexity than sparseset. Ciao! Steven

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-30 Thread Richard Guenther
On Mon, Jul 30, 2012 at 4:43 PM, Peter Bergner wrote: > On Fri, 27 Jul 2012 15:40:35 +0200 Richard Guenther > wrote: >> Also it looks less efficient than sbitmap in the case when >> your main operation is adding to the set and querying the set randomly. > > How so? Adding/deleting a member to a

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-30 Thread Peter Bergner
On Fri, 27 Jul 2012 15:40:35 +0200 Richard Guenther wrote: > Also it looks less efficient than sbitmap in the case when > your main operation is adding to the set and querying the set randomly. How so? Adding/deleting a member to a sparseset is an O(1) operation, as is querying whether somethin

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-27 Thread William J. Schmidt
On Fri, 2012-07-27 at 15:40 +0200, Richard Guenther wrote: > On Thu, Jul 26, 2012 at 11:57 AM, Steven Bosscher > wrote: > > On Thu, Jul 26, 2012 at 11:23 AM, Richard Guenther > > wrote: > >> Ok! Thanks for adding this exhaustive documentation. > > > > There's more to come! I want to add some ex

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-27 Thread Richard Guenther
On Thu, Jul 26, 2012 at 11:57 AM, Steven Bosscher wrote: > On Thu, Jul 26, 2012 at 11:23 AM, Richard Guenther > wrote: >> Ok! Thanks for adding this exhaustive documentation. > > There's more to come! I want to add some explanations to ebitmap, > pointer-set, fibheap, and splay-tree as sets, and

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-26 Thread Steven Bosscher
On Thu, Jul 26, 2012 at 12:14 PM, Alexander Monakov wrote: > Hello, > > + the set. If an element I is in the set, then sparse[I] is the > + index of I in the dense vector, and dense[I] == I. The dense > ^ > This should read "dense[sparse[I]

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-26 Thread Alexander Monakov
Hello, + the set. If an element I is in the set, then sparse[I] is the + index of I in the dense vector, and dense[I] == I. The dense ^ This should read "dense[sparse[I]] == I" Thanks Alexander

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-26 Thread Steven Bosscher
On Thu, Jul 26, 2012 at 11:23 AM, Richard Guenther wrote: > Ok! Thanks for adding this exhaustive documentation. There's more to come! I want to add some explanations to ebitmap, pointer-set, fibheap, and splay-tree as sets, and add a chapter in the gccint manual too. Now if only you'd document

Re: [patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-26 Thread Richard Guenther
On Thu, Jul 26, 2012 at 11:16 AM, Steven Bosscher wrote: > Hello, > > Add some explanations because I see a lot of places where the choice > of data structure is less than optimal. > > Also some functional changes: sbitmap with popcounts are only used in > ebitmap, and they penalize the "normal" c

[patch[ Add explanations to sbitmap, bitmap, and sparseset

2012-07-26 Thread Steven Bosscher
Hello, Add some explanations because I see a lot of places where the choice of data structure is less than optimal. Also some functional changes: sbitmap with popcounts are only used in ebitmap, and they penalize the "normal" case without popcount a lot. Bootstrapped&tested on powepc64-unknown-l