forked from elm/compiler
-
Notifications
You must be signed in to change notification settings - Fork 2
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
System IO refactor #48
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
decioferreira
added a commit
that referenced
this pull request
Dec 8, 2024
The main change here revolved around the re-implementation of the IO monad, allowing for the removal of the need for the top level decoder. As part of this work we had to move some of the data structures from modules like `Compiler.Type.UnionFind`, `Compiler.Type.Type` and `Compiler.Elm.ModuleName` into the IO monad modules, so that we can have them directly referred on the `RealWorld` record (before we had to use `Decode.Value` because otherwise we would create import cycles). This also: - seems to have solved #33 - partially addresses #10 - greatly improved performance (relates to #37) The improvement on performance was the following (from `~56:58.46` to `~2:28.32`): Before: ``` % time guida make --optimize --output=bin/guida.js src/Terminal/Main.elm Starting downloads... ● andre-dietrich/parser-combinators 4.1.0 ● elm/time 1.0.0 ● elm/json 1.1.3 ● pilatch/flip 1.0.0 ● elm/virtual-dom 1.0.3 ● elm/regex 1.0.0 ● elm/random 1.0.0 ● elm/bytes 1.0.8 ● fredcy/elm-parseint 2.0.1 ● dasch/levenshtein 1.0.3 ● rtfeldman/elm-hex 1.0.0 ● elm/parser 1.1.0 ● the-sett/elm-pretty-printer 3.1.0 ● elm-community/basics-extra 4.1.0 ● elm/url 1.0.0 ● elm-community/array-extra 2.6.0 ● elm-community/list-extra 8.7.0 ● elm-community/maybe-extra 5.3.0 ● obiloud/numeric-decimal 3.0.1 ● elm/core 1.0.5 ● zwilias/elm-rosetree 1.5.0 ● guida-lang/graph 1.0.0 ● guida-lang/glsl 1.0.0 ● elm/html 1.0.0 ● elm-explorations/test 2.2.0 Dependencies ready! Success! Compiled 132 modules. Terminal.Main ───> bin/guida.js guida make --optimize --output=bin/guida.js src/Terminal/Main.elm 3666.89s user 249.74s system 114% cpu 56:58.46 total ``` After: ``` % time guida make --optimize --output=bin/guida.js src/Terminal/Main.elm Starting downloads... ● andre-dietrich/parser-combinators 4.1.0 ● elm/time 1.0.0 ● elm/bytes 1.0.8 ● elm/regex 1.0.0 ● elm/virtual-dom 1.0.3 ● elm/random 1.0.0 ● the-sett/elm-pretty-printer 3.1.0 ● rtfeldman/elm-hex 1.0.0 ● fredcy/elm-parseint 2.0.1 ● elm/html 1.0.0 ● elm/json 1.1.3 ● dasch/levenshtein 1.0.3 ● elm-community/list-extra 8.7.0 ● elm/url 1.0.0 ● elm/core 1.0.5 ● pilatch/flip 1.0.0 ● elm-community/array-extra 2.6.0 ● elm-community/basics-extra 4.1.0 ● elm-community/maybe-extra 5.3.0 ● guida-lang/graph 1.0.0 ● guida-lang/glsl 1.0.0 ● zwilias/elm-rosetree 1.5.0 ● elm/parser 1.1.0 ● obiloud/numeric-decimal 3.0.1 ● elm-explorations/test 2.2.0 Dependencies ready! Success! Compiled 141 modules. Terminal.Main ───> bin/guida.js guida make --optimize --output=bin/guida.js src/Terminal/Main.elm 157.99s user 2.57s system 108% cpu 2:28.32 total ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The main change here revolved around the re-implementation of the IO monad, allowing for the removal of the need for the top level decoder.
As part of this work we had to move some of the data structures from modules like
Compiler.Type.UnionFind
,Compiler.Type.Type
andCompiler.Elm.ModuleName
into the IO monad modules, so that we can have them directly referred on theRealWorld
record (before we had to useDecode.Value
because otherwise we would create import cycles).This also:
ianmackenzie/elm-geometry
package #33compiler/src/Utils.elm
into multiple modules #10The improvement on performance was the following (from
~56:58.46
to~2:28.32
):Before:
After: