-
Notifications
You must be signed in to change notification settings - Fork 0
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
String optimization #6
Comments
Since sizeof(char) is always 1, should we use Should we use |
Should we just remove the |
For copy assignment operator and move assignment operator, we should call destructor to destroy the old object before constructing a new one.
When we move a String object, we won't allocate a new block but reuse the old one and transfer its ownership to the new object. If we called the moved object's destructor, this block will be deallocated and the new object's |
String errors should be preceded by "string: " or "spiderdb::string:" to remove capitalism altogether (no pun intended). Also, why do we want to allow constructing a string with length 0? |
We should replace |
For For For For All the comparison operators (==, !=, >, <. >=, <=) should be |
We should move Also, there's no need to make We also might want to be able to create an |
Various ways to optimize spiderdb::string
The text was updated successfully, but these errors were encountered: