chromatic wrote:
On Monday 22 June 2009 03:22:56 Vasily Chekalkin wrote:

a) 1 usage of cstring Hash in string/api.c for constants. Can be easily
converted to  normal STRING*. (Thinking little bit) Hey. What about
unicode constants? Especially UCS2?

That code uses that cache to *avoid* creating new STRINGs when something wants a new constant STRING. If you make it a STRING hash, you might as well remove it.

Ah. Ok. Missed this.

OTOH behaviour of cstring Hash isn't protected from, for example, dlclose calls.

Benchmark it if you do.

I hope that our GC can create simple STRING* faster than hash lookup over 992 elements with very expensive byte access to calculate hash-value for cstring. But I'll benchmark it it anyway before do it.

--
Bacek
_______________________________________________
http://lists.parrot.org/mailman/listinfo/parrot-dev

Reply via email to