Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unusually poor performance in current release version #8

Open
austrin opened this issue Nov 16, 2018 · 4 comments
Open

Unusually poor performance in current release version #8

austrin opened this issue Nov 16, 2018 · 4 comments
Assignees

Comments

@austrin
Copy link
Contributor

austrin commented Nov 16, 2018

The Oct 21 release version of problemtools seems to have severe performance degradation from the April 22 release, on slow-running scripts.

Concrete examples include the ascendingphoto problem from NWERC 2017 (e.g. case 07-big.in went from 4.7 to 6.0 seconds) even though b281d3f, added between the two versions, claims to improve performance on that specific set.

As an extreme example, I found one script that took ~5 minutes to run on the April 22 release, and more than 3 hours (after which I decided to stop waiting) to run on the Oct 21 release.

@eldering eldering self-assigned this Nov 16, 2018
@eldering
Copy link
Member

@austrin can you provide the specific script and test data that went from ~5 minutes to > 3 hours? That would be helpful in debugging.

@austrin
Copy link
Contributor Author

austrin commented Nov 17, 2018

eldering added a commit that referenced this issue Nov 18, 2018
That commit caused unnecessary creation of string objects in
REGEX commands. Work around that by providing direct access
to the data buffer. Also use peek() instead of next() to
not construct unnecessary single-char string objects.

Addresses #8.
@eldering
Copy link
Member

Ok, I've fixed one issue causing performance degradation since 2018-04-22, but I don't see performance degradation for ascendingphoto. Here's my runtimes for the whole data sets of these problems from NWERC 2018: https://gist.github.com/eldering/5dd61a4f46abc451292dc97725f3ce40
Note the checktestdata without suffix is the current versoin and that I don't have the last two since checktestdata crashes on the large test cases of jugglingtroupe, but that's not a regression.
I'm running this on an Intel CPU G3258 @ 3.20GHz, compiled with gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516.

@TPolzer
Copy link
Contributor

TPolzer commented Nov 20, 2018

Sidenote: That crash is a nice reminder why RE2 is a good regex implementation.

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

No branches or pull requests

3 participants