12-19-2025, 04:32 AM
Actually, strings aren't limited. It is just a continous memory block, and it can be of any size.
I use it for sizes upto 4gb...
But they are slow, because whenever we edit the length of a string, it is copied to another location. -> Workaround is to use string buffers (which I use in my compression algorithms)
And about arrays, they are fast, but they use more data to store than strings, and are harder to manage when it comes to multi dimensional...
What about nested lists? Arrays cannot do that...
And Arrays are also slower for insertion and deletion.
But we have a workaround with strings for that too. (We can partition a string into multiple strings which will form an array -> this data structure is a Rope)
And I use Rope for my text editors, it is blazingly fast for both opening and saving files of sizes upto 200mb...
Now about my ListString: It uses sequential access, so I will make a new one which supports:
1. Lists
2. Maps (can be compared to Python Dictionaries)
3. Nested Data
This will enable us to parse JSON too.
And I will use an index map in the beginning of the list. Yes, it will make it bigger, but it will be useful for random access.
Then we can think of hash tables... Now this is a little far...
Well, if you wanna build something, good luck.
And we are always here to help.
I use it for sizes upto 4gb...
But they are slow, because whenever we edit the length of a string, it is copied to another location. -> Workaround is to use string buffers (which I use in my compression algorithms)
And about arrays, they are fast, but they use more data to store than strings, and are harder to manage when it comes to multi dimensional...
What about nested lists? Arrays cannot do that...
And Arrays are also slower for insertion and deletion.
But we have a workaround with strings for that too. (We can partition a string into multiple strings which will form an array -> this data structure is a Rope)
And I use Rope for my text editors, it is blazingly fast for both opening and saving files of sizes upto 200mb...
Now about my ListString: It uses sequential access, so I will make a new one which supports:
1. Lists
2. Maps (can be compared to Python Dictionaries)
3. Nested Data
This will enable us to parse JSON too.
And I will use an index map in the beginning of the list. Yes, it will make it bigger, but it will be useful for random access.
Then we can think of hash tables... Now this is a little far...

Well, if you wanna build something, good luck.
And we are always here to help.

