Skip to content

Comments

Add string functionalities for strings in LazyExprs#570

Merged
lshaw8317 merged 46 commits intomainfrom
add_str
Feb 19, 2026
Merged

Add string functionalities for strings in LazyExprs#570
lshaw8317 merged 46 commits intomainfrom
add_str

Conversation

@lshaw8317
Copy link
Collaborator

@lshaw8317 lshaw8317 commented Feb 5, 2026

Add support for unicode dtypes and following functions:

  • ==
  • startswith
  • endswith
  • contains

With miniexpr enabled, fast_eval is roughly 4x faster than when not using miniexpr (see bench/stringops_bench.py):

== took 0.037s for miniexpr
== took 0.112s for normal fast path
contains took 0.037s for miniexpr
contains took 0.323s for normal fast path
startswith took 0.036s for miniexpr
startswith took 0.177s for normal fast path
endswith took 0.035s for miniexpr
endswith took 0.172s for normal fast path

Last thing to do is handle md_compile_nd_ex/md_compile_nd_jit problem, possibly at level of miniexpr.

Copy link
Member

@FrancescAlted FrancescAlted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good first step in the right direction. I have some small comments.

Copy link
Member

@FrancescAlted FrancescAlted left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. This looks fine to me. Remember to add a benchmark to see whether miniexpr can accelerate operations with strings or not.

@lshaw8317
Copy link
Collaborator Author

Ok. This looks fine to me. Remember to add a benchmark to see whether miniexpr can accelerate operations with strings or not.

It seems like miniexpr doesn't support strings for some reason...

@lshaw8317 lshaw8317 merged commit cf5f8df into main Feb 19, 2026
17 checks passed
@lshaw8317 lshaw8317 deleted the add_str branch February 19, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants