The Artima Developer Community
Sponsored Link

Articles Forum
How the Use of Scala's Features Affects Compile Time

9 replies on 1 page. Most recent reply: Aug 3, 2019 6:03 AM by Joe Gracia

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 9 replies on 1 page
Bill Venners

Posts: 2285
Nickname: bv
Registered: Jan, 2002

How the Use of Scala's Features Affects Compile Time Posted: Feb 11, 2013 10:00 PM
Reply to this message Reply
Advertisement
The compiletime project is an attempt to better understand the relationship between the use of Scala's features and compile time. This article gives a quick overview of what we've learned so far.

http://www.artima.com/articles/compile_time.html


Eric Torreborre

Posts: 36
Nickname: etorreborr
Registered: Oct, 2007

Re: How the Use of Scala's Features Affects Compile Time Posted: Feb 12, 2013 12:50 PM
Reply to this message Reply
Thanks Bill for this very detailed post. I can confirm that the effect of using an abstract class instead of a trait is a dramatic improvement for specs2 (from 225s to compile the full project to 133s).

About the comparison of the matchers and the effect of having a double by-name in specs2, it'd be nice to measure specs2 again with "1 + 1 must beEqualTo(2)" instead of "1 + 1 must be equalTo(2)" because in the second case there's one more implicit being called.

E.

Channing Walton

Posts: 32
Nickname: channing
Registered: May, 2003

Re: How the Use of Scala's Features Affects Compile Time Posted: Feb 12, 2013 1:28 PM
Reply to this message Reply
How are you doing that Eric? Is it just a case of creating a new abstract class extending Specification, or do mean changing Specification to be abstract?

Channing

Bill Venners

Posts: 2285
Nickname: bv
Registered: Jan, 2002

Re: How the Use of Scala's Features Affects Compile Time Posted: Feb 12, 2013 2:45 PM
Reply to this message Reply
> Thanks Bill for this very detailed post. I can confirm
> that the effect of using an abstract class instead of a
> trait is a dramatic improvement for specs2 (from 225s to
> compile the full project to 133s).
>
That's an awesome improvement. Is that about a half second per test class? Because that's what the results would have predicted.

> About the comparison of the matchers and the effect of
> having a double by-name in specs2, it'd be nice to measure
> specs2 again with "1 + 1 must beEqualTo(2)" instead of "1
> + 1 must be equalTo(2)" because in the second case there's
> one more implicit being called.
>
Can you do a pull request on the compiletime project? I didn't realize there was a beEqualTo.

Bill

Eric Torreborre

Posts: 36
Nickname: etorreborr
Registered: Oct, 2007

Re: How the Use of Scala's Features Affects Compile Time Posted: Feb 13, 2013 4:22 PM
Reply to this message Reply
I did what Bill recommended: changed Specification to SpecificationLike and added "abstract class Specification extends SpecificationLike". I also re-published specs2 1.12.4-SNAPSHOT (for scala 2.9.2) and 1.13.1-SNAPSHOT (for scala 2.10) so if you use one of those 2 you should see some improvement.

Eric Torreborre

Posts: 36
Nickname: etorreborr
Registered: Oct, 2007

Re: How the Use of Scala's Features Affects Compile Time Posted: Feb 13, 2013 4:30 PM
Reply to this message Reply
Yes, that's approximately that:

- 176 test classes / 2 = 88
- 225 - 133 = 92

It's interesting to see that it is that predictable. That'd be interesting to see which other projects in the community are compiling lots of entities to traits and would benefit from this.

> Can you do a pull request on the compiletime project? I didn't realize there was a beEqualTo.

I just did.

E.

Channing Walton

Posts: 32
Nickname: channing
Registered: May, 2003

Re: How the Use of Scala's Features Affects Compile Time Posted: Feb 14, 2013 12:50 AM
Reply to this message Reply
Fantastic

stupid blogger

Posts: 1
Nickname: stupid20
Registered: May, 2019

Re: How the Use of Scala's Features Affects Compile Time Posted: May 23, 2019 3:15 AM
Reply to this message Reply
Much of our infrastructure is written in Scala and we have several large libraries supporting our use. While highly effective, Scala is also a large language, and our experiences have taught us to practice great care in its application.

if you want to gain more knowledge related technology so you can read on https://www.stupidblogger.com/ & get more interesting facts and news.

kevin levin

Posts: 1
Nickname: kevinpcsus
Registered: Jul, 2019

Eliminating all the Issues of Printer with the Help of Support Posted: Jul 17, 2019 5:27 AM
Reply to this message Reply
Printer Customer Support US gives you the most effective service for Printer Support. If you need any Printer Support Service Dial - +1 888-237-9333. And Visit at:
Printer Customer Support
Printer Customer Support Number
Printer Support Number
HP Printer Support
HP Printer Customer Support
Canon Printer Support
Canon Printer Customer Support
Lexmark Printer Customer Support
Lexmark Printer Support
Epson Printer Support
Epson Printer Customer Support
Brother Printer Customer Support
Brother Printer Support

Joe Gracia

Posts: 1
Nickname: joegracia
Registered: Aug, 2019

Re: How the Use of Scala's Features Affects Compile Time Posted: Aug 3, 2019 6:03 AM
Reply to this message Reply
well, look at here and grab academic assistance.
https://myassignmenthelp.com/homework/do-my-homework-for-me.html

Flat View: This topic has 9 replies on 1 page
Topic: Defining "Done" in User Stories Previous Topic   Next Topic Topic: Pure Virtual Function Called: An Explanation


Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2018 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use