github ashvardanian/StringZilla v1.1.0

latest releases: v4.6.0, v4.5.1, v4.5.0...
2 years ago

1.1.0 (2023-08-06)

New Functionality

Do you want to work with large arrays of separate strings? There is a way! The following code is now valid:

from stringzilla import Str, File, Strs

text: Str = Str('... very large string or file ...')
lines: Strs = text.split(separator='\n')
lines.sort()
lines.shuffle(seed=42)

sorted_copy: Strs = lines.sorted()
shuffled_copy: Strs = lines.shuffled(seed=42)

lines.append(shuffled_copy.pop(0))
lines.append('Pythonic string')
lines.extend(shuffled_copy)

Performance

You can expect even those trivial operations to be 8x faster than native Python 🤯

Screenshot 2023-08-06 at 21 11 37

Add

  • Collection-level append, extend (9a2b357)
  • random shuffle for strings collections (36c1a58)

Fix

  • static_cast for Clang builds (bd0a671)
  • Counting substrings with allowoverlap (5234e8a)

Don't miss a new StringZilla release

NewReleases is sending notifications on new releases.