50% of regex_v8 benchmark time is 2 regexes

Open
#388 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
performance

Research direction

Start with the regex_v8 benchmark and its block1 section, focusing on the two regexs[17].sub calls shown in the issue. Profile or time those calls and compare the result with the full benchmark and V8 behavior. Done means the benchmark remains correct and those calls no longer account for roughly half of its runtime.

Written by the indexing model from the issue text.

Description

These 2 lines in block1:

        regexs[17].sub(r'', strings[2], count=subcount[17])

        # This prints a unicode escape where the V8 version prints the
        # unicode character.
        regexs[17].sub(r'', strings[3], count=subcount[17])

take 140 ms to run

while full benchmark takes 300 ms.

Dominant language
Python
Stars
1k
Forks
203
Avg merge
1h 20m
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from python/pyperformance

All issues in python/pyperformance

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.