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

Provide fast generic comparer for bool values #5076

Merged
merged 3 commits into from
Jun 4, 2018

Conversation

vasily-kirichenko
Copy link
Contributor

No description provided.

@dsyme
Copy link
Contributor

dsyme commented Jun 2, 2018

@dotnet-bot Test Ubuntu16.04 Release_default Build please

@dsyme
Copy link
Contributor

dsyme commented Jun 2, 2018

@dotnet-bot Test Ubuntu16.04 Release_fcs Build please

@smoothdeveloper
Copy link
Contributor

@dsyme I've noticed the ubuntu builds tend to fail due to nuget pulling packages.

Since nuget tend to fail as a nuget client when server is busy, I think it would make sense to use paket for the same role, it retries the download few times and generally complete with higher success rate AFAIU.

@cartermp
Copy link
Contributor

cartermp commented Jun 2, 2018

@KevinRansom @TIHan @brettfo Assuming this is approved by Monday, let's aim to merge this into 15.8 and F# 4.5.

Note that @vasily-kirichenko has proven that this removed quite a few allocations with completion: #5066 (comment)

Copy link
Member

@KevinRansom KevinRansom left a comment

Choose a reason for hiding this comment

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

Looks good to me. Although, I have to admit, that sorting an array of bools, might not be the most common algorithm in computer science.

@dsyme
Copy link
Contributor

dsyme commented Jun 3, 2018

Looks good to me. Although, I have to admit, that sorting an array of bools, might not be the most common algorithm in computer science.

The big uses likely happen when bools are used as part of some larger key, e.g. a dictionary keyed by (string * bool) or type Key = Key of string * bool. Even in these cases the tuple comparer should normally get inlined and specialised but in cases where this doesn't happen for some reason the key comparisons may end up going down the routes in this PR. (as an aside I'd be curious of the source of the above comparisons and why specialization wasn't kicking in)

@TIHan TIHan merged commit 0e851c6 into dotnet:master Jun 4, 2018
dsyme pushed a commit that referenced this pull request Jun 5, 2018
* Update README.md

* Update README.md

* Update README.md

* [RFCs FS-1051, FS-1052, FS-1053] support for span, readonly refs, byref-like structs (#4888)

* initial support for span, readonly refs, byref-like structs

* fix proto build

* make proto work with previous FSharp.Core

* make proto work with previous FSharp.Core

* update baselines

* integrate code cleanup

* integrate code cleanup

* integrate code cleanup

* integrate code cleanup

* fix build

* fix build

* implicit deref of byref returns

* add tests for Memory, ReadOnlySpan and ReadOnlyMemory

* fix tests

* simplify diff

* simplify diff

* remove duplicate error messages

* fix build

* test updates

* fix build

* fix build

* update baselines

* fix uses of NativePtr.toByRef

* switch to inference using byref pointer capabilities

* fix proto build

* update baselines, byref extension methods

* fix test errors

* emit in,out,modreq attributes correctly

* update tests

* fix build

* fix build

* fix tests

* fix tests

* get it right silly boy

* fix test

* minor cleanup

* add more tests

* clarify overloading behaviour + test case

* fix build break

* fix build of tests

* update tests

* add more tests

* byref fixes

* updates for subsumption calls, error message, assign-to-return-byref

* test updates, implicit deref on byref return for normal functions

* update baseline

* improve debug formatting, better error message on implicit deref, improve error messages

* add more tests for recursive functions

* update baselines

* fix baselines

* updates for new test cases

* updates for new test cases

* test updates and byref-to-byreflike

* deal with 'M() <- expr'

* restrict addresses of immutable top-level things

* fix IsByRefLike on struct

* update tests

* fix test

* fix test

* improve check for no-return-of-struct-field-addresses

* fix test case

* Provide fast generic comparer for bool values (#5076)

* provide fast generic comparer for bool values

* formatting

* no completion on name of value and function declaration (#5083)

* LOC CHECKIN | Microsoft/visualfsharp master | 20180604 | Termchange (#5082)

* fix merge
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.

None yet

6 participants