-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create FenderString type #93
Comments
this is done and an optimization was added to increase the performance of modifying strings by updating the cached version of the string as well but this could cause a performance hit in some scenarios so we should do some bench-marking to see if this is a good idea or not since this is a further and technically unnecessary optimization I believe we can leave it to after the beta launch as more of a improving the language steps rather than just creating the initial version of it |
possible solutions are:
I feel like we should go with either the first or third and then if we go with the third say something in the docs that the default form should only be used in the repl or maybe personal scripts and that any code that gets shared should use the specific forms to maintain performance this might also make no difference and its just faster to never do it in which case im putting too much thought into this thing that I am saying we shouldn't think about right now anyway |
I think storing strings strictly as |
Well with the current implementation and the potential optimization you can do that cause the strings are just a Vec but there is a cached version of the printable version of the string so that if you print the same piece of text multiple times you don't need to iterate over the Vec each time the optimization I am talking about is if the cached string is up to date and another string or character gets appended then it will also append the character to the cached rust string |
the more I think about it the more ways I can see for optimizing it in different ways and for prioritizing different things, like compute time vs memory. So I wanna say push off trying to do all these now so we can get a better idea of what will be usable and work best in real scenarios during the beta. So for now lets just either have the cached string get updated when quickly possible or just remove it for now and just have it get dropped when the cached string is de-synced. |
actually having the caching be an optional opt in thing sounds like a good idea to just implement now if you agree |
Our current string type uses a rust string, which can't be indexed by character. We should switch to a string type which holds a
Vec<char>
.The text was updated successfully, but these errors were encountered: