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

Spec suite speed increase #4463

Closed
wants to merge 2 commits into from
Closed

Conversation

jkthorne
Copy link
Contributor

This is just Pull request to discuss minor changes to increase spec speed.

@jkthorne
Copy link
Contributor Author

found a small change to increase spec speed.

This is twice as fast and the more zeros you add the faster this gets but I was not sure if it was worth the noise in the code.
You can can get this 3X faster with lines of zeros.

$ ./bin/crystal build  -o lol spec/compiler/semantic/tuple_spec.cr; and ./lol -p
Using compiled compiler at `.build/crystal'
............................

Top 10 slowest examples (3.525191 seconds, 79.64% of total time):
  Semantic: tuples [OLD] errors on tuple too big (#3816)
    1.458227 seconds spec/compiler/semantic/tuple_spec.cr:253
  Semantic: tuples [NEW] errors on tuple too big (#3816)
    0.624328 seconds spec/compiler/semantic/tuple_spec.cr:265
  Semantic: tuples errors on recusrive splat expansion (1) (#361)
    0.513098 seconds spec/compiler/semantic/tuple_spec.cr:95
  Semantic: tuples accepts tuple covariance in array
    0.468301 seconds spec/compiler/semantic/tuple_spec.cr:179
  Semantic: tuples types tuple of one element
    0.086395 seconds spec/compiler/semantic/tuple_spec.cr:4
  Semantic: tuples can iterate T
    0.084299 seconds spec/compiler/semantic/tuple_spec.cr:195
  Semantic: tuples allows tuple covariance
    0.060034 seconds spec/compiler/semantic/tuple_spec.cr:122
  Semantic: tuples can name a tuple type
    0.057933 seconds spec/compiler/semantic/tuple_spec.cr:60
  Semantic: tuples types tuple [0]
    0.057894 seconds spec/compiler/semantic/tuple_spec.cr:16
  Semantic: tuples matches tuple with splat (2) (#2932)
    0.057389 seconds spec/compiler/semantic/tuple_spec.cr:233
  Semantic: tuples types tuple metaclass [0]
    0.057293 seconds spec/compiler/semantic/tuple_spec.cr:36

Finished in 4.43 seconds
28 examples, 0 failures, 0 errors, 0 pending

@jkthorne jkthorne closed this May 25, 2017
@jkthorne jkthorne deleted the spec_speed branch July 11, 2020 04:56
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

1 participant