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

Speed up is_a_spec #43

Closed
wants to merge 1 commit into from
Closed

Speed up is_a_spec #43

wants to merge 1 commit into from

Conversation

farleyknight
Copy link
Contributor

Speed up is_a_spec by about 6 seconds on my work laptop.

farleyknight:~/dev/crystal/crystal$ rspec spec/codegen/is_a_spec.rb 
Run options: exclude {:primitives=>true, :integration=>true}
.....................

Finished in 4.01 seconds
21 examples, 0 failures
farleyknight:~/dev/crystal/crystal$ rspec spec/codegen/is_a_spec.rb 
Run options: exclude {:primitives=>true, :integration=>true}
.....................

Finished in 10.62 seconds
21 examples, 0 failures

@coveralls
Copy link

Coverage Status

Coverage remained the same when pulling e0479dd on farleyknight:speed_up_is_a_spec into 26b1236 on manastech:master.

@asterite
Copy link
Member

Sorry, but no. Each spec should have a single Program. If you reuse a Program across many runs than all definitions conflict: you reopen classes, bind variables to new types, etc.

In this case it might succeed, but just because nothing is overwritten in each separate spec. But what if we add another spec that conflicts with the others?

@asterite asterite closed this Sep 19, 2013
straight-shoota added a commit to straight-shoota/crystal that referenced this pull request Oct 19, 2021
0fd17140e Merge pull request crystal-lang#43 from icyleaf/hotfix/byte-slice-negative
d6c21f986 fix: avoids negative
276ad2b1f Merge branch 'master' of github.com:icyleaf/markd
5ed32aca8 Merge pull request crystal-lang#42 from Nephos/update-crystal120-uri-encode-warning
74b09257c chore: append Crystal 1.1 and 1.2 to test
7f674d146 fix: compatibility with Crystal version under 1.2
57c2dc63e Merge branch 'master' of github.com:icyleaf/markd
154f8935a crystal 1.2: update URI.encode (depreciation)
9cee410fe Merge pull request crystal-lang#41 from Nephos/feature-toc-fix
8b67caf4e Toc: finish table of content implementation
79e393712 Merge branch 'master' of github.com:icyleaf/markd
0748b2275 Merge pull request crystal-lang#40 from icyleaf/release/0.4.1
05a72ef9e bump v0.4.1
ac666f0d1 Merge branch 'master' of github.com:icyleaf/markd
f300c21a8 Merge pull request crystal-lang#38 from straight-shoota/feature/code_block_body-lang
e2baa3c9c Add `lang` parameter to to `HTMLRenderer#code_block_body`
673562747 Merge pull request crystal-lang#37 from straight-shoota/feature/html-renderer-hooks
57688ad8f Merge pull request crystal-lang#36 from straight-shoota/feature/options-doc
4daea0c7a Add HTMLRenderer code block body hooks
a00c2cadd Refactor HTMLRenderer code block languages
66dd48104 Make Options a class
531ca8685 Document options

git-subtree-dir: lib/markd
git-subtree-split: 0fd17140ee0e83465980082c12426548b262af55
straight-shoota added a commit to straight-shoota/crystal that referenced this pull request Oct 19, 2021
5e5a75d13 Merge branch 'master' of github.com:icyleaf/markd
04eb4c213 Merge pull request crystal-lang#44 from icyleaf/release/0.4.2
ba62a01be bump 0.4.2
5ad0b8e26 Merge branch 'master' of github.com:icyleaf/markd
0fd17140e Merge pull request crystal-lang#43 from icyleaf/hotfix/byte-slice-negative
d6c21f986 fix: avoids negative
276ad2b1f Merge branch 'master' of github.com:icyleaf/markd
5ed32aca8 Merge pull request crystal-lang#42 from Nephos/update-crystal120-uri-encode-warning
74b09257c chore: append Crystal 1.1 and 1.2 to test
7f674d146 fix: compatibility with Crystal version under 1.2
57c2dc63e Merge branch 'master' of github.com:icyleaf/markd
154f8935a crystal 1.2: update URI.encode (depreciation)
9cee410fe Merge pull request crystal-lang#41 from Nephos/feature-toc-fix
8b67caf4e Toc: finish table of content implementation
79e393712 Merge branch 'master' of github.com:icyleaf/markd
0748b2275 Merge pull request crystal-lang#40 from icyleaf/release/0.4.1
05a72ef9e bump v0.4.1
ac666f0d1 Merge branch 'master' of github.com:icyleaf/markd
f300c21a8 Merge pull request crystal-lang#38 from straight-shoota/feature/code_block_body-lang
e2baa3c9c Add `lang` parameter to to `HTMLRenderer#code_block_body`
673562747 Merge pull request crystal-lang#37 from straight-shoota/feature/html-renderer-hooks
57688ad8f Merge pull request crystal-lang#36 from straight-shoota/feature/options-doc
4daea0c7a Add HTMLRenderer code block body hooks
a00c2cadd Refactor HTMLRenderer code block languages
66dd48104 Make Options a class
531ca8685 Document options

git-subtree-dir: lib/markd
git-subtree-split: 5e5a75d13bfdc615f04cc7ab166ee279b3b996d3
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

Successfully merging this pull request may close these issues.

None yet

3 participants