[nem-pl] Re: [svn] nemerle/trunk/lib/internal-numbered.n

Lukasz Kaiser kaiser at tenet.pl
Thu Jun 3 16:04:54 CEST 2004


Hej.

> gint32
> ves_icall_System_String_GetHashCode (MonoString *me)
> {
> 	int i, h = 0;
> 	gunichar2 *data = mono_string_chars (me);
> 
> 	MONO_ARCH_SAVE_REGS;
> 
> 	for (i = 0; i < mono_string_length (me); ++i)
> 		h = (h << 5) - h + data [i];
> 
> 	return h;
> }
> 
> w mono maj?? tak dla string??w, jakie?? lepsze propozycje?

Dla krotek to chyba zupelnie ok, natomiast w zasadzie to przydaloby 
sie tez zrobic cos takiego dla list. No a dla list to GetHashCode 
chyba nie powinien biegac prez cala liste, bo to moze strasznie duzo 
czasu trwac. Chociaz moze tak, a moze w ogole dla list to jest nie 
potrzebne. Nie wiem, co myslicie ?

- lk





More information about the devel-pl mailing list