Skip to content

Announcing Scala.js 1.14.0. #617

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

Merged
merged 1 commit into from
Sep 25, 2023
Merged

Announcing Scala.js 1.14.0. #617

merged 1 commit into from
Sep 25, 2023

Conversation

gzm0
Copy link
Contributor

@gzm0 gzm0 commented Sep 23, 2023

No description provided.

@gzm0
Copy link
Contributor Author

gzm0 commented Sep 23, 2023

Needs to wait for:

  • Scala 2.13.12 update
  • Actual release :P

The linker will now avoid generating a default bridge in a subclass if an existing bridge in the superclass can be used.
This can lead to minor code-size improvements.

## Call-site inline
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put this title and "new ECMAScript core types" under a ## Improvements?

We should also mention scala-js/scala-js#4904 for Scala 3 users.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've opted to put everything under a ## Improvements. This also made it possible to move default bridge generation lower (IMO less relevant for most users).


### Reachability Analysis is parallel by default

We have observed up to 2x speedup of reachability analysis on the Scala.js test suite with this change.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if the 2x is too marketing-y here. It is true, but most people will not care about the reachability analysis in isolation but about the whole linking process.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe mention how much of the whole linker is taken up by the analysis?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes :-/ Do we have these numbers?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems we do: scala-js/scala-js#4897 (comment) :) I'll run some analysis.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> d %>%
  filter(!grepl(':', op)) %>%
  group_by(variant, op) %>%
  summarise(t_ns = median(t_ns)) %>%
  group_by(variant) %>%
  summarise(t_ns = sum(t_ns))
  
`summarise()` has grouped output by 'variant'. You can override using the `.groups` argument.
# A tibble: 3 × 2
  variant        t_ns
  <fct>         <dbl>
1 main     1090421195
2 parallel  835999739
3 pr        866628092

So overall a 20% speedup.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We have observed up to 2x speedup of reachability analysis on the Scala.js test suite with this change.
We have observed up to 2x speedup of reachability analysis on the Scala.js test suite with this change, which corresponds to a 20% speedup to the overall linker.

@gzm0 gzm0 requested a review from sjrd September 24, 2023 17:08
@gzm0
Copy link
Contributor Author

gzm0 commented Sep 24, 2023

This is complete now.

  • Needs to wait on the actual release of course.
  • Needs the correct date.

Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we'll be able to release tomorrow (25/09/2023 for the date).

We are pleased to announce the release of Scala.js 1.14.0!

This release mainly brings speed improvements in the reachability analysis by parallizing it.
TODO Mention 2.13.12 upgrade.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still a TODO here.


### Reachability Analysis is parallel by default

We have observed up to 2x speedup of reachability analysis on the Scala.js test suite with this change.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We have observed up to 2x speedup of reachability analysis on the Scala.js test suite with this change.
We have observed up to 2x speedup of reachability analysis on the Scala.js test suite with this change, which corresponds to a 20% speedup to the overall linker.


### Implicit conversions to js.Any for js.UndefOr in Scala 3

Because `js.UndefOr` is implemented differently in Scala 3, implicit conversion to `js.Any` was not available.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Because `js.UndefOr` is implemented differently in Scala 3, implicit conversion to `js.Any` was not available.
Because `js.UndefOr` is implemented differently in Scala 3, the implicit conversion to `js.Any` was not available.

@gzm0 gzm0 marked this pull request as ready for review September 25, 2023 08:15
@gzm0 gzm0 requested a review from sjrd September 25, 2023 08:15
@gzm0
Copy link
Contributor Author

gzm0 commented Sep 25, 2023

  • Addresses all the comments (I forgot to push some changes last time, sorry).
  • Adjusted the date
  • Squashed.

Copy link
Member

@sjrd sjrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

Publishing of the artifacts is in progress. :)

@sjrd sjrd merged commit 1a6fc00 into scala-js:main Sep 25, 2023
@gzm0 gzm0 deleted the version-1.14.0 branch December 9, 2023 21:30
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.

2 participants