Re: Faster string streaming

2011-05-30 Thread Jan Hubicka
> On 05/29/2011 06:14 PM, Richard Guenther wrote: >>> > >>> > -/* Returns a hash code for P. */ >>> > +/* Returns a hash code for P. >>> > + Shamelessly*/ >> ... stolen from libiberty. >> >> ? >> >> Ok with that comment adjusted. > > Why steal it :) if you can instead add the code to libibe

Re: Faster string streaming

2011-05-29 Thread Paolo Bonzini
On 05/29/2011 06:14 PM, Richard Guenther wrote: > > -/* Returns a hash code for P. */ > +/* Returns a hash code for P. > + Shamelessly*/ ... stolen from libiberty. ? Ok with that comment adjusted. Why steal it :) if you can instead add the code to libiberty? Paolo

Re: Faster string streaming

2011-05-29 Thread Richard Guenther
On Sun, May 29, 2011 at 4:31 PM, Jan Hubicka wrote: > Hi, > string straming is quite wasteful by creating a copy of every string it gets, > looking it up in hashtable, freeing if it is present and adding otherwise.   > The > copy is made just to add 0 value to terminate it since htab_hash_string i

Faster string streaming

2011-05-29 Thread Jan Hubicka
Hi, string straming is quite wasteful by creating a copy of every string it gets, looking it up in hashtable, freeing if it is present and adding otherwise. The copy is made just to add 0 value to terminate it since htab_hash_string is used and it expects 0 terminated strings that is not always th