-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add "+=" operator for strings #1500
Comments
[EDIT: here I was actually referring to Zeek scripting, I missed that this issue is for Spicy rather than Zeek scripting] Just to tease apart two separate issues here: (1) the streamlined simplicity of being able to express |
@vpax, could you clarify (2), in particular where you see quadratic performance for For extremely long strings it might still make sense to switch to a different data structure (e.g., non-continuous storage, more involved data structures like ropes or similar, ...), but the exact tradeoffs depend likely on what operations you would like to see made faster. One could e.g., make |
@bbannier sorry I missed that this was in a Spicy context. I was referring to regular Zeek. |
Strings do not have the
+=
operator and concatenation is expensive when doinga = a + b;
. An alternative is to convert strings to bytes and then concatenate, but it would be nice to have+=
supported for strings natively.The text was updated successfully, but these errors were encountered: