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

remove Ref allocation on task switch #35606

Merged
merged 1 commit into from
Apr 27, 2020
Merged

remove Ref allocation on task switch #35606

merged 1 commit into from
Apr 27, 2020

Conversation

JeffBezanson
Copy link
Sponsor Member

pfib(31) before:

  3.180960 seconds (14.34 M allocations: 1.512 GiB, 28.57% gc time)

after:

  2.835908 seconds (10.89 M allocations: 1.461 GiB, 21.35% gc time)

The times are pretty variable, and the GC is doing a good job here, but reducing the allocation workload here is surely worth it.

(also needs #35589 to get this result)

@JeffBezanson JeffBezanson added performance Must go faster domain:multithreading Base.Threads and related functionality labels Apr 26, 2020
Copy link
Sponsor Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

It's an odd seeming API, but it is what we need to do under-the-hood, so makes sense to lift it to the higher level.

@JeffBezanson JeffBezanson merged commit 9a712ae into master Apr 27, 2020
@JeffBezanson JeffBezanson deleted the jb/taskswitchref branch April 27, 2020 22:53
mbauman added a commit that referenced this pull request Apr 28, 2020
* origin/master: (833 commits)
  Improve typesubtract for tuples (#35600)
  Make searchsorted*/findnext/findprev return values of keytype (#32978)
  fix buggy rand(RandomDevice(), Bool) (#35590)
  remove `Ref` allocation on task switch (#35606)
  Revert "partr: fix multiqueue resorting stability" (#35589)
  exclude types with free variables from `type_morespecific` (#35555)
  fix small typo in NEWS.md (#35611)
  enable inline allocation of structs with pointers (#34126)
  SparseArrays: Speed up right-division by diagonal matrices (#35533)
  Allow hashing 1D OffsetArrays
  NEWS item for introspection macros (#35594)
  Special case empty covec-diagonal-vec product (#35557)
  [GCChecker] fix a few tests by looking through casts
  Use norm instead of abs in generic lu factorization (#34575)
  [GCChecker,NFC] run clang-format -style=llvm
  [GCChecker] fix tests and add Makefile
  Add introspection macros support for dot syntax (#35522)
  Specialize `union` for `OneTo` (#35577)
  add pop!(vector, idx, [default]) (#35513)
  bump Pkg version (#35584)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:multithreading Base.Threads and related functionality performance Must go faster
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants