Note that there are some explanatory texts on larger screens.

plurals
  1. POIs there a string type with 8 BIT chars?
    text
    copied!<p>I need to store much strings in RAM. But they do not contain special unicode characters, they all contains only characters from "ISO 8859-1" that is one byte.</p> <p>Now I could convert every string, store it in memory and convert it back to use it with .Contains() and methods like this, but this would be overhead (in my opinion) and slow.</p> <p>Is there a string class that is fast and reliable and offers some methods of the original string class like .Contains()?</p> <p>I need this to store more strings in memory with less RAM used. Or is there an other way to do it?</p> <p>Update:</p> <p>Thank you for your comments and your answer.</p> <p>I have a class that stores string. Then with one method call I need to figure out if I already have that string in memory. I have about <strong>1000 strings to figure out</strong> if they are in the list <strong>a second</strong>. hundred of millions in total. The average size of the string is about 20 chars. It is really the RAM that cares me.</p> <p>I even thought about compress some millions of strings and store these packages in memory. But then I need to decompress it every time I need to access the values.</p> <p>I also tried to use a HashSet, but the needed memory amount was even higher.</p> <p>I don't need the true value. Just to know if the value is in the list. So if there is a hash-value that can do it, even better. But all I found need more memory than the pure string. </p> <p>Currently there is no plan for further internationalization. So it is something I would deal with when it is time to :-)</p> <p>I don't know if using a database would solve it. I don't need to fetch anything, just to know if the value was stored in the class. And I need to do this fast. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload