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:
2026-05-11 01:14:43 +00:00
parent ba91b1b3b1
commit ccb885607a
37 changed files with 1203 additions and 366 deletions
+4 -2
View File
@@ -1,4 +1,6 @@
__pycache__/
*.py[cod]
*.egg-info/
.env
*.pyc
__pychache__/
devplace.db*
.pytest_cache/