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

Deprecate flipbits! in favor of dot-broadcasting #27067

Merged
merged 4 commits into from
May 14, 2018
Merged

Conversation

mbauman
Copy link
Sponsor Member

@mbauman mbauman commented May 10, 2018

Seems like we no longer need this function:

julia> B = bitrand(100,1000);

julia> @benchmark flipbits!($B)
BenchmarkTools.Trial:
  memory estimate:  0 bytes
  allocs estimate:  0
  --------------
  minimum time:     87.996 ns (0.00% GC)
  median time:      88.474 ns (0.00% GC)
  mean time:        88.596 ns (0.00% GC)
  maximum time:     118.378 ns (0.00% GC)
  --------------
  samples:          10000
  evals/sample:     960

julia> @benchmark $B .= .!$B
BenchmarkTools.Trial:
  memory estimate:  0 bytes
  allocs estimate:  0
  --------------
  minimum time:     88.060 ns (0.00% GC)
  median time:      88.202 ns (0.00% GC)
  mean time:        88.314 ns (0.00% GC)
  maximum time:     137.057 ns (0.00% GC)
  --------------
  samples:          10000
  evals/sample:     960

Seems like we no longer need this function:

```julia
julia> B = bitrand(100,1000);

julia> @benchmark flipbits!($B)
BenchmarkTools.Trial:
  memory estimate:  0 bytes
  allocs estimate:  0
  --------------
  minimum time:     87.996 ns (0.00% GC)
  median time:      88.474 ns (0.00% GC)
  mean time:        88.596 ns (0.00% GC)
  maximum time:     118.378 ns (0.00% GC)
  --------------
  samples:          10000
  evals/sample:     960

julia> @benchmark $B .= .!$B
BenchmarkTools.Trial:
  memory estimate:  0 bytes
  allocs estimate:  0
  --------------
  minimum time:     88.060 ns (0.00% GC)
  median time:      88.202 ns (0.00% GC)
  mean time:        88.314 ns (0.00% GC)
  maximum time:     137.057 ns (0.00% GC)
  --------------
  samples:          10000
  evals/sample:     960
```
@mbauman mbauman added kind:deprecation This change introduces or involves a deprecation domain:arrays [a, r, r, a, y, s] labels May 10, 2018
test/bitarray.jl Outdated
@@ -779,7 +779,8 @@ timesofar("dequeue")
@testset "flipbits!" begin
Copy link
Contributor

Choose a reason for hiding this comment

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

"in-place .!"?

@JeffBezanson
Copy link
Sponsor Member

The ci skip in the last commit is preventing CI from running. Need to squash the commits and remove that tag.

@mbauman
Copy link
Sponsor Member Author

mbauman commented May 14, 2018

MacOS failure is #26725.

@mbauman mbauman merged commit 12f4ebd into master May 14, 2018
@mbauman mbauman deleted the mb/deprecate-flipbits branch May 14, 2018 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:arrays [a, r, r, a, y, s] kind:deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants