Re: Prevayler-Discussion Digest, Vol 34, Issue 1
Karl Wettin <[email protected]>
| Newsgroups | gmane.comp.java.prevayler |
|---|---|
| Message-ID | <[email protected]> |
15 aug 2010 kl. 18.23 skrev Klaus Wuestefeld:
>> I was simply
>> thinking a Map<String, String> where key and value is the same
>> instance.
>
> That is the same as a Set. You propably want a
> Set<WeakReference<String>>.
I'm not sure about the WeakReference as there is a cost associated
with that too. Iterating all my instances once a week to find the
delta it probably enough for me as I pretty much never delete
anything. Or is there something I'm forgetting?
>
> And Strings use 2 bytes for each char. If you have mostly ASCII, you
> can use byte[] instead to store String.getBytes("UTF-8").
Another good point.
Perhaps I should implement my own String, using the first byte as
bitset for encoding and what not. I'll report back later with any
findings.
Thanks for the input,
karl
------------------------------------------------------------------------------
This SF.net email is sponsored by
Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________
To unsubscribe go to the end of this page: http://lists.sourceforge.net/lists/listinfo/prevayler-discussion
_______________________________________________
"Databases in Memoriam" -- http://www.prevayler.org