-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
More performance improvements #4210
Conversation
Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Jim.Idle <jimi@idle.ws>
undefined Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr> Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: Josua Frank <josua.frank@daimlertruck.com> Signed-off-by: Jim.Idle <jimi@idle.ws>
Posix threads are available only on Unix (and unix like) platforms. Wrap the dependency accordingly so builds don't fail on other platforms. Signed-off-by: HS <hs@apotell.com> Signed-off-by: Jim.Idle <jimi@idle.ws>
… in to the root (pre v4) files (antlr#4154) - Incorporate an interative tree walker - Expose Reset() and String() in lexer/token and add test Signed-off-by: Jim.Idle <jimi@idle.ws>
* feat: Remove the old version of the source code, as at v4.x.y the source must be under /v4 for modules Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: tidy up old version of go.mod (non v4 version), which is now deprecated Signed-off-by: Jim.Idle <jimi@idle.ws> --------- Signed-off-by: Jim.Idle <jimi@idle.ws>
The badge in the README suggests that ANTLR requires Java 7 or higher, whereas since ANTLR v4.10 Java 11 or higher is required. Signed-off-by: Robert Adam <dev@robert-adam.de> (cherry picked from commit 8188dc5) Signed-off-by: Jim.Idle <jimi@idle.ws>
…BUILD_CPP_TESTS is not set (antlr#4121) Signed-off-by: Leonardo Sarmiento <leonardo@moduleworks.com> Co-authored-by: Leonardo Sarmiento <leonardo@moduleworks.com> Signed-off-by: Jim.Idle <jimi@idle.ws>
* Cpp: Remove code duplication The same function was defined inside multiple different source files (in an anonymous namespace). Not only is this generally bad practice from a maintenance point of view, but it also break unity builds (which can speed up compilation times A LOT). The fix simply consists in introducing a new Utils file that contains the single implementation and every source file that uses this function simply has to be linked against that new file (and include the corresponding header). Signed-off-by: Robert Adam <dev@robert-adam.de> * CI: Enable unity builds for cpp targets This should reduce the build time for those steps significantly Note: Unity builds are enabled only for cmake-based CI builds Signed-off-by: Robert Adam <dev@robert-adam.de> * CI: Perform unity and non-unity cpp builds Signed-off-by: Robert Adam <dev@robert-adam.de> --------- Signed-off-by: Robert Adam <dev@robert-adam.de> Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: Josua Frank <josua.frank@daimlertruck.com> Signed-off-by: Jim.Idle <jimi@idle.ws>
…4 off the replace option on the go.mod file (antlr#4163) Arrrgh! Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Jim.Idle <jimi@idle.ws>
…lashes with builtin funcs (antlr#4161) Signed-off-by: Jim.Idle <jimi@idle.ws>
* fix: Fixes the failing go runtime test suite which was missing the /v4 off the replace option on the go.mod file Arrrgh! Signed-off-by: Jim.Idle <jimi@idle.ws> * present antlr before versioning (antlr#4156) Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Prevent use of labels such as start= from generating code that clashes with builtin funcs (antlr#4161) Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Cater for the fact that some test rules use start as a label or rule name As a fix for other cvode gen errors when start, end, or exception are used as label names, they are now translated to have a suffix of `_` at code gen time. However, the runtime tests sometimes use start as a rule name and so we must now cater for this in the tests. Signed-off-by: Jim.Idle <jimi@idle.ws> --------- Signed-off-by: Jim.Idle <jimi@idle.ws> Co-authored-by: ericvergnaud <eric.vergnaud@wanadoo.fr> Signed-off-by: Jim.Idle <jimi@idle.ws>
…ntlr#4169) * doc: Updates to some of the Go doc comments to start a ful ldocumentation cleanup Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: More documentation fixes. Using this as a method of forcing myself to read every line of code in the runtime, and therefore discover mistakes in the original implementation. And, of course, actually working docs for the Go runtime, can only be a good thing. Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: More documentation fixes Also changes the exporet level of a some variables and funcs that were not correct, even though no user has currently needed them it would seem. Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: Many updates to document exported fuctions correctly and reformat the ingerited Java code It looks like a massive amount of changes, but it is almost all doc or changing exports or renaming unused paramters etc to make the Go linter happy. No actual code changes yet. Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: More additions and corrections to the Go documentation for the runtime Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: Final clean of exported func and type documentation There will be more to do here as there are a lot of things that are hidden internal to the antlr package that probably should not be. There are also a lot of exported funcs and types without any documentation, that will eventually need to be cleaned up. Signed-off-by: Jim.Idle <jimi@idle.ws> * Changed Parser typings (antlr#4149) Signed-off-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: Josua Frank <josua.frank@daimlertruck.com> Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Fixes the failing go runtime test suite which was missing the /v4 off the replace option on the go.mod file (antlr#4163) Arrrgh! Signed-off-by: Jim.Idle <jimi@idle.ws> * present antlr before versioning (antlr#4156) Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Prevent use of labels such as start= from generating code that clashes with builtin funcs (antlr#4161) Signed-off-by: Jim.Idle <jimi@idle.ws> * Feature/gotestfix (antlr#4168) * fix: Fixes the failing go runtime test suite which was missing the /v4 off the replace option on the go.mod file Arrrgh! Signed-off-by: Jim.Idle <jimi@idle.ws> * present antlr before versioning (antlr#4156) Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Prevent use of labels such as start= from generating code that clashes with builtin funcs (antlr#4161) Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Cater for the fact that some test rules use start as a label or rule name As a fix for other cvode gen errors when start, end, or exception are used as label names, they are now translated to have a suffix of `_` at code gen time. However, the runtime tests sometimes use start as a rule name and so we must now cater for this in the tests. Signed-off-by: Jim.Idle <jimi@idle.ws> --------- Signed-off-by: Jim.Idle <jimi@idle.ws> Co-authored-by: ericvergnaud <eric.vergnaud@wanadoo.fr> Signed-off-by: Jim.Idle <jimi@idle.ws> --------- Signed-off-by: Jim.Idle <jimi@idle.ws> Signed-off-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: Josua Frank <frank.josua@gmail.com> Co-authored-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: ericvergnaud <eric.vergnaud@wanadoo.fr> Signed-off-by: Jim.Idle <jimi@idle.ws>
* feat: Createa n Init routine for BaseATNConfig so we can embed sructs rather than allocate to pointers Signed-off-by: Jim.Idle <jimi@idle.ws> * feat: Change BaseATNConfig to be properly embedded in other structs such as LexerATNConfig instead of by pointer This is the first of many changes that switches the embedded class structure that was copying Java class hieracrchy from allocations/new to proper embedding such that any struct is allocated with one allocation not two or more. Main PR will cover what this means. Signed-off-by: Jim.Idle <jimi@idle.ws> * feat: Change embedding for ATNBaseSimulator to true embedding instaed of pointer Saves an extra allocation and helps the GC Signed-off-by: Jim.Idle <jimi@idle.ws> * feat: Switch the use of pointers to embedded ATN states to true embeddding Saves many allocations and grbage collections Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Correct the way that PredictionContext is compared for merge Should reduce allocation count by tons. Signed-off-by: Jim.Idle <jimi@idle.ws> * Feature/docclean Greatly improve the godoc comments in the runtime (antlr#4169) * doc: Updates to some of the Go doc comments to start a ful ldocumentation cleanup Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: More documentation fixes. Using this as a method of forcing myself to read every line of code in the runtime, and therefore discover mistakes in the original implementation. And, of course, actually working docs for the Go runtime, can only be a good thing. Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: More documentation fixes Also changes the exporet level of a some variables and funcs that were not correct, even though no user has currently needed them it would seem. Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: Many updates to document exported fuctions correctly and reformat the ingerited Java code It looks like a massive amount of changes, but it is almost all doc or changing exports or renaming unused paramters etc to make the Go linter happy. No actual code changes yet. Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: More additions and corrections to the Go documentation for the runtime Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: Final clean of exported func and type documentation There will be more to do here as there are a lot of things that are hidden internal to the antlr package that probably should not be. There are also a lot of exported funcs and types without any documentation, that will eventually need to be cleaned up. Signed-off-by: Jim.Idle <jimi@idle.ws> * Changed Parser typings (antlr#4149) Signed-off-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: Josua Frank <josua.frank@daimlertruck.com> Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Fixes the failing go runtime test suite which was missing the /v4 off the replace option on the go.mod file (antlr#4163) Arrrgh! Signed-off-by: Jim.Idle <jimi@idle.ws> * present antlr before versioning (antlr#4156) Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Prevent use of labels such as start= from generating code that clashes with builtin funcs (antlr#4161) Signed-off-by: Jim.Idle <jimi@idle.ws> * Feature/gotestfix (antlr#4168) * fix: Fixes the failing go runtime test suite which was missing the /v4 off the replace option on the go.mod file Arrrgh! Signed-off-by: Jim.Idle <jimi@idle.ws> * present antlr before versioning (antlr#4156) Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Prevent use of labels such as start= from generating code that clashes with builtin funcs (antlr#4161) Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Cater for the fact that some test rules use start as a label or rule name As a fix for other cvode gen errors when start, end, or exception are used as label names, they are now translated to have a suffix of `_` at code gen time. However, the runtime tests sometimes use start as a rule name and so we must now cater for this in the tests. Signed-off-by: Jim.Idle <jimi@idle.ws> --------- Signed-off-by: Jim.Idle <jimi@idle.ws> Co-authored-by: ericvergnaud <eric.vergnaud@wanadoo.fr> Signed-off-by: Jim.Idle <jimi@idle.ws> --------- Signed-off-by: Jim.Idle <jimi@idle.ws> Signed-off-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: Josua Frank <frank.josua@gmail.com> Co-authored-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: ericvergnaud <eric.vergnaud@wanadoo.fr> * feat: Change BaseATNConfig to be properly embedded in other structs such as LexerATNConfig instead of by pointer This is the first of many changes that switches the embedded class structure that was copying Java class hieracrchy from allocations/new to proper embedding such that any struct is allocated with one allocation not two or more. Main PR will cover what this means. Signed-off-by: Jim.Idle <jimi@idle.ws> * feat: Change embedding for ATNBaseSimulator to true embedding instaed of pointer Saves an extra allocation and helps the GC Signed-off-by: Jim.Idle <jimi@idle.ws> * fix: Correct the way that PredictionContext is compared for merge Should reduce allocation count by tons. Signed-off-by: Jim.Idle <jimi@idle.ws> * doc: Merge documentation updates Signed-off-by: Jim.Idle <jimi@idle.ws> * feat: Rework predictions tructs to use emedding instead of pointers Signed-off-by: Jim.Idle <jimi@idle.ws> * feat: more reworking of PredictionContext for embedding Signed-off-by: Jim.Idle <jimi@idle.ws> * feat: Ensure that EmptyPredictionContext is correctly initialized Rework of the variaous PredictionContexts has reduced memory allocations to between 30% and 50% of previous version. Signed-off-by: Jim.Idle <jimi@idle.ws> * feat: Change from use of type casting to using stored type Signed-off-by: Jim.Idle <jimi@idle.ws> * feat: Convert CommonToken to true emedding rather than pointers Signed-off-by: Jim.Idle <jimi@idle.ws> --------- Signed-off-by: Jim.Idle <jimi@idle.ws> Signed-off-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: Josua Frank <frank.josua@gmail.com> Co-authored-by: Josua Frank <josua.frank@daimlertruck.com> Co-authored-by: ericvergnaud <eric.vergnaud@wanadoo.fr> Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Eric Vergnaud <eric.vergnaud@wanadoo.fr> Signed-off-by: Jim.Idle <jimi@idle.ws>
…omparing two pointers! Fixes: antlr#3967 Closes antlr#3967 - A small error was made whereby the comparison with a newly created merge `M` of two prediction contexts `a` and `b`, was comparing the pointers of `a` and `M` and not using the internal Equals() method. The ATN output trace is now equal. - Also adds a new testrig internal project (so it won't be used by `go get`) that allows quick setup and testing of ATN tracing for a test grammar and test input. - Excludes go performance profiles from git - Corrects a small error in one of the ATN tracing scripts. Signed-off-by: Jim.Idle <jimi@idle.ws>
… fixed Signed-off-by: Jim.Idle <jimi@idle.ws>
- I missed this on my first evaluation of all the collections used by the code I inherited. The PredictionCache was implemented as a map using PredictionContext pointers as the key. This meant that there would never be a cache hit and the cache woudl just accumulate massive numbers of PredictionContext 'objects'! Bloody hell. Sometimes it is difficult to spot such glaring errors. This change vastly reduces memory usage. The next commit will fix the visited context look up which also suffers from the same problem. Fixes: antlr#3934 It probably also fixes a ton of performance and memory usage problems, which I have yet to test. Signed-off-by: Jim.Idle <jimi@idle.ws>
- Note, I think that this still needs work, but it is a lot better memory wise. Signed-off-by: Jim.Idle <jimi@idle.ws>
Some of the legacy code that tried to implement comparisons and hashing like Java was just plain wrong. That stuff is buried deep in there and took a massive effort to work out what was going wrong. In the end, while the hash codes were OK for DFAState, the comparisons inherited from the old code were just plain wrong for certain objects. With those corrected, there is a massive improvement in performance all around. I will push a PR for this stuff now, but I already see some massive potential gains by getting rid of interfaces where we don't need them stopping the use of pointers everywhere indiscrimiately. Next task is going to be pure performance improvements until the Go runtime takes its rightful place as the fastest implementation ;) Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Jim.Idle <jimi@idle.ws>
- I will of course fix this in a follow up PR, but the test DropLoopEntryBranchInLRRule_4 currently hangs. It is also disabled for many other runtimes, so I think it is fine to get this PR in and then follow up with a fix for this test. Signed-off-by: Jim.Idle <jimi@idle.ws>
- Removes the need to perform a `go mod tidy` for every test. This change causes `go mod tidy` to be run once, after which it caches the go.mod and go.sum files for use by the remaining tests. Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Jim.Idle <jimi@idle.ws>
Signed-off-by: Jim.Idle <jimi@idle.ws>
… flowcontrol - 50% performance improvement - Prior to this change, a recognition error was tracked by performing a panic(), which the generated code for rules would then use recover() to discover. However, recover() is not like catch(){} in Java and is expensive to run even if there is no panic() to find on the execution stack. Eliminating this and doing a simple check at the end of rule execution brings with it a massive performance improvement up to 50% of CPU execution time. Now that collections and context caching is working correctly this is a significant improvement in execution time. Signed-off-by: Jim.Idle <jimi@idle.ws>
@parrt This PR is all ready to go mate! Phew! |
|
@parrt The PR says it is ready to merge. Perhaps you saw an earlier email? |
Ok. I will check again. It’s saying ready to merge to dev. WTF?
…On Tue, Mar 28, 2023 at 23:33 Terence Parr ***@***.***> wrote:
This PR is all ready to go mate! Phew!
Hi! It looks like there are some merge conflicts according to GitHub
—
Reply to this email directly, view it on GitHub
<#4210 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMDH2MXQ44ZCGFKTVPLW6MADPANCNFSM6AAAAAAWKGQZ3M>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Now it says there are... GitHUb sometimes. |
No conflict here |
Nor me. I find some of the views tabs confusing. When you view changed
files, it looks like there are conflicts, but they are all resolved and
tested
…On Wed, Mar 29, 2023 at 7:29 AM ericvergnaud ***@***.***> wrote:
No conflict here
—
Reply to this email directly, view it on GitHub
<#4210 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMAVKMBJOTQYHD67KZLW6NX7DANCNFSM6AAAAAAWKGQZ3M>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Looks good now @parrt |
merged manually using cmd-line. thanks, @jimidle !!! |
Yeah - I think this kind of thing happens when:
It's because of forks I think. I don't have this issue using git flow and having people submit from a non-fork branch Anyway -it's done, and I will avoid a rebase from dev if possible. |
Soon I hope. It will happen when @parrt calls for a new release. My current work is basically preventing him from calling that. But I think it is worth the wait for the end of next week, when I will be done with all my experiments on memory allocation/pressure and add a few more performance tweaks that will be good for well formed grammars. I have pretty much concluded the investigation into ways we might address memory and essentially I am finding that the existing GC is better than anything we can do in user code space. Mainly because it is extremely difficult to work out exactly when certain structs are no longer referenced and can be reused without getting the GC itself to tell me. So, I think I am done with memory work as of right now. I may come back to this after the next release and see if I can work out exactly where and when I can reuse structs. But in this release I have added diagnostics and stats that allow at least me to work out what things are causing slow parsing - it is always a poor grammar, but it is useful to know what parts of a bad grammar cause difficulties, in case there can be a few wins. I will leave it to Terence to decide when the new release should happen. It is not a ten minute task I think. |
Okay, Thank you. Between, I have tried using the dev branch for benchmarking my rule paring code: go get github.com/antlr/antlr4/runtime/Go/antlr/v4@dev Used antlr-4.12.0-complete.jar to generate the code,
Anything I'm missing here? |
Codegen has changed. You need to use the dev version of the tool
…On Sun, Apr 9, 2023 at 03:53 Akbar Shaikh ***@***.***> wrote:
Hello @jimidle <https://github.com/jimidle>,
When are we planning to merge these changes to the master branch?
between which jar should be used to generate the code using the dev branch?
cc: @parrt <https://github.com/parrt>
Soon I hope. It will happen when @parrt <https://github.com/parrt> calls
for a new release. My current work is basically preventing him from calling
that. But I think it is worth the wait for the end of next week, when I
will be done with all my experiments on memory allocation/pressure and add
a few more performance tweaks that will be good for well formed grammars.
I have pretty much concluded the investigation into ways we might address
memory and essentially I am finding that the existing GC is better than
anything we can do in user code space. Mainly because it is extremely
difficult to work out exactly when certain structs are no longer referenced
and can be reused without getting the GC itself to tell me.
So, I think I am done with memory work as of right now. I may come back to
this after the next release and see if I can work out exactly where and
when I can reuse structs. But in this release I have added diagnostics and
stats that allow at least me to work out what things are causing slow
parsing - it is always a poor grammar, but it is useful to know what parts
of a bad grammar cause difficulties, in case there can be a few wins.
I will leave it to Terence to decide when the new release should happen.
It is not a ten minute task I think.
Okay, Thank you.
Between, I have tried using the dev branch for benchmarking my rule paring
code:
go get ***@***.***
Used antlr-4.12.0-complete.jar to generate the code,
But after the code is generated, getting the below error in the
*_parser.go
parser/myrule_parser.go:1367:67: not enough arguments in call to p.GetInterpreter().AdaptivePredict
have (antlr.TokenStream, number, antlr.ParserRuleContext)
want (*antlr.BaseParser, antlr.TokenStream, int, antlr.ParserRuleContext)
Anything I'm missing here?
—
Reply to this email directly, view it on GitHub
<#4210 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMCRWRMH6DBTB4I3UHDXAG647ANCNFSM6AAAAAAWKGQZ3M>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi, you need to build it, I’m afraid...
… Le 11 avr. 2023 à 09:38, Akbar Shaikh ***@***.***> a écrit :
Codegen has changed. You need to use the dev version of the tool
… <x-msg://17/#>
On Sun, Apr 9, 2023 at 03:53 Akbar Shaikh @.> wrote: Hello @jimidle <https://github.com/jimidle> https://github.com/jimidle, When are we planning to merge these changes to the master branch? between which jar should be used to generate the code using the dev branch? cc: @parrt <https://github.com/parrt> https://github.com/parrt Soon I hope. It will happen when @parrt <https://github.com/parrt> https://github.com/parrt calls for a new release. My current work is basically preventing him from calling that. But I think it is worth the wait for the end of next week, when I will be done with all my experiments on memory allocation/pressure and add a few more performance tweaks that will be good for well formed grammars. I have pretty much concluded the investigation into ways we might address memory and essentially I am finding that the existing GC is better than anything we can do in user code space. Mainly because it is extremely difficult to work out exactly when certain structs are no longer referenced and can be reused without getting the GC itself to tell me. So, I think I am done with memory work as of right now. I may come back to this after the next release and see if I can work out exactly where and when I can reuse structs. But in this release I have added diagnostics and stats that allow at least me to work out what things are causing slow parsing - it is always a poor grammar, but it is useful to know what parts of a bad grammar cause difficulties, in case there can be a few wins. I will leave it to Terence to decide when the new release should happen. It is not a ten minute task I think. Okay, Thank you. Between, I have tried using the dev branch for benchmarking my rule paring code: go get @. Used antlr-4.12.0-complete.jar to generate the code, But after the code is generated, getting the below error in the _parser.go parser/myrule_parser.go:1367:67: not enough arguments in call to p.GetInterpreter().AdaptivePredict have (antlr.TokenStream, number, antlr.ParserRuleContext) want (antlr.BaseParser, antlr.TokenStream, int, antlr.ParserRuleContext) Anything I'm missing here? — Reply to this email directly, view it on GitHub <#4210 (comment) <#4210 (comment)>>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ7TMCRWRMH6DBTB4I3UHDXAG647ANCNFSM6AAAAAAWKGQZ3M . You are receiving this because you were mentioned.Message ID: @.*>
Sorry, Not able to find it, Can you please help me here?
Where can I find the dev version of tool jar?
—
Reply to this email directly, view it on GitHub <#4210 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAZNQJBKESYPUFHUPVRWUS3XAUC6ZANCNFSM6AAAAAAWKGQZ3M>.
You are receiving this because you commented.
|
Actually you don't I guess. When the build checks run for the PR request, it does actually upload the built jar. But it is a little convoluted. For this PR:
|
@jimidle Here are the perf results for the master vs dev branch Master Branch
Dev Branch
|
I would need to see:
- Your benchmark code
- Your grammar
- Your input
In order to comment on this. Did you already post that somewhere?
Also, is this SLL mode, SLL first then LL?
Jim
…On Tue, Apr 11, 2023 at 6:39 PM Akbar Shaikh ***@***.***> wrote:
@jimidle <https://github.com/jimidle> Here are the perf results for the
master vs dev branch
*Master Branch*
BenchmarkParseRule-10 6449614 20035 ns/op 8882 B/op 179 allocs/op
BenchmarkEvaluateUsingAntlrVisitor-10 74199505 1143 ns/op 208 B/op 12 allocs/op
*Dev Branch*
BenchmarkParseRule-10 3132622 23037 ns/op 12192 B/op 230 allocs/op
BenchmarkEvaluateUsingAntlrVisitor-10 79340918 881.7 ns/op 160 B/op 9 allocs/op
—
Reply to this email directly, view it on GitHub
<#4210 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMEIWQXVAZ5PGDH3PCTXAUYF3ANCNFSM6AAAAAAWKGQZ3M>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@jimidle there was some mistake, I have updated the above results @jimidle here are the above requested details which are used perf testing: https://github.com/AkbaraliShaikh/test |
Ok cool. If you want to send the benchmark to me privately, then that’s ok
with me
Also, there is an outstanding PR that improves good grammars. And one I’m
working on that allows a single thread mode to avoid muteness. That’s a bit
experimental, so you have to use a build configuration tag for it.
…On Tue, Apr 11, 2023 at 19:03 Akbar Shaikh ***@***.***> wrote:
@jimidle <https://github.com/jimidle> there was some mistake, I have
update the above results
—
Reply to this email directly, view it on GitHub
<#4210 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ7TMHL2I2WJMPDQYC7TX3XAU3BXANCNFSM6AAAAAAWKGQZ3M>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Fix: Performance improvements for hashtable stuff and cache and fix to comparator
A lot of small changes in this one. Even though some of the commits look massive, they are all just
type changes from interface to struct pointers and similar things. They are all interrelated and cannot be separated
out.
This gets the Go runtime faster than Java on good grammars and within shouting distance on the terrible ones such as the MySql grammar. I am going to submit some improvements for those terrible grammars but my next task is memory pools for structs and related things that will have a big effect on these crummy grammars. This change gives me these results on my Mac for the MySql grammar:
Warmup run
Elapsed time (0): 1m40.088535933s
Performance round # 1
Elapsed time (1): 1m18.048023031s|
The
bitrix_queries_cut.sql
is still quite poor compared to Java. Its because the big input file causes gobs of allocations in both Java and Go. My memory changes will greatly affect these times.@parrt PLease merge this when you can as I need these changes to make my memory pool changes. I will do some fancy branching and rebasing to deal with it until you can merge for me.
@kaby76 - you should find this is now runnable on your system. All benchmarks that are SLL or half decent grammars should really be very fast. There was an issue filed a while back with test source. The reporter wanted 0.2 seconds but we are now very very much faster than that with the go runtime.