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

work around perf regression on 0.7 #101

Merged
merged 1 commit into from
Jul 23, 2018
Merged

Conversation

KristofferC
Copy link
Member

Fixes #100

The 1:length(a) is safe to use since this method is only valid for Array and views thereof.

Before:

julia> @btime colwise!($d,$(Euclidean()), $A, $B);
  638.378 ns (82 allocations: 3.84 KiB)

After

julia> @btime colwise!($d,$(Euclidean()), $A, $B);
  179.346 ns (0 allocations: 0 bytes)

0.6 for reference:

julia> @btime colwise!($d,$(Euclidean()), $A, $B);
  238.585 ns (0 allocations: 0 bytes)

@KristofferC KristofferC force-pushed the kc/07_perf_workaround branch 2 times, most recently from 9c6d9ee to 51161b2 Compare July 23, 2018 08:57
@KristofferC KristofferC force-pushed the kc/07_perf_workaround branch from 51161b2 to 8aef56d Compare July 23, 2018 09:15
@KristofferC
Copy link
Member Author

Test fails because the tests are run with check-bounds=yes. I added a @test_broken for that but test it when running the file directly, e.g. via include. Test passes locally.

@KristofferC KristofferC merged commit 00452ab into master Jul 23, 2018
@KristofferC KristofferC deleted the kc/07_perf_workaround branch July 23, 2018 09:24
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.

1 participant