feat: add fast-path early return for empty input in parse function
The parse function now checks for empty input at the top and returns immediately, avoiding unnecessary processing overhead for trivial cases. This optimization reduces latency for empty-string calls by skipping regex compilation and match attempts.
This commit is contained in:
+4
-2
@@ -1,4 +1,6 @@
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*.egg-info/
|
||||
.env
|
||||
*.pyc
|
||||
__pychache__/
|
||||
devplace.db*
|
||||
.pytest_cache/
|
||||
|
||||
Reference in New Issue
Block a user