Skip to content

Conversation

@manofstick
Copy link
Contributor

This is a standalone improvement, as is #5112, but this is branched off the tail of that PR as I see it being approved and integrated first, as this is still currently a WIP.

Copy link
Contributor

Choose a reason for hiding this comment

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

why not if...then...else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's what was there previously...

Copy link
Contributor

Choose a reason for hiding this comment

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

sbyte[] will match on this branch as well. Are you sure GenericHashByteArray will produce correct result in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yep, I know, still WIP...

Copy link
Contributor

Choose a reason for hiding this comment

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

This whole condition is fully duplicated on line 1152. Maybe extract it into a function?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not the same - strings

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 wouldn't bother too much checking this yet. I'm still a while off completing it...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is done in the final PR #5307 btw, so assuming the whole chain of PRs is accepted...

@vasily-kirichenko
Copy link
Contributor

@manofstick merge conflict!

@manofstick
Copy link
Contributor Author

manofstick commented Jul 13, 2018

@vasily-kirichenko

Not being the master of git (or github) I don't know the process to fix.

The conflicted code can just be deleted (it was a line you added, which is now redundant). So the solution is to just ignore the mainline.

Should I could rebase off master?

@manofstick
Copy link
Contributor Author

Slightly modified tests from #5112... (so they don't necessarily make sense, more just to try as many cases...)

1) https://gist.github.com/manofstick/33fefb8ac6b60d401375be738b521ac3

64-bit

test original modified percent
custom dynamic 3599.00 1193.17 33%
custom structural 3614.00 1380.33 38%
custom default 1190.83 1197.33 101%
value dynamic 2958.33 2187.17 74%
value structural 1248.50 1240.00 99%
value default 1245.33 1249.00 100%
gen value dynamic 6026.33 2466.50 41%
gen value structural 4130.17 1503.33 36%
gen value default 4085.83 1524.83 37%
ref dynamic 2680.83 1749.67 65%
ref structural 1214.00 1262.83 104%
ref default 1314.67 1361.67 104%
gen ref dynamic 5882.17 2026.17 34%
gen ref structural 4343.50 1572.33 36%
gen ref default 4502.50 1673.50 37%
tuple dynamic 5618.67 4430.00 79%
tuple structural 1099.67 1070.33 97%
tuple default 7953.00 7844.33 99%
value tuple dynamic 5719.00 1570.17 27%
value tuple structural 5835.83 1558.83 27%
value tuple default 1686.67 1535.17 91%

32-bit

test original modified percent
custom dynamic 11149.33 1192.33 11%
custom structural 11198.00 3798.5 34%
custom default 1280.50 1208.83 94%
value dynamic 9668.33 3648.83 38%
value structural 1337.00 1251.33 94%
value default 1321.83 1259.83 95%
gen value dynamic 19472.33 6444.83 33%
gen value structural 11084.00 3522.83 32%
gen value default 10975.00 3560.67 32%
ref dynamic 10149.17 3766.83 37%
ref structural 1353.50 1281.67 95%
ref default 1505.67 1438.83 96%
gen ref dynamic 20249.33 6484.83 32%
gen ref structural 12903.83 4804.17 37%
gen ref default 11318.67 3961.5 35%
tuple dynamic 18689.67 11176.33 60%
tuple structural 1326.33 1256.67 95%
tuple default 9330.17 8640.83 93%
value tuple dynamic 17674.67 1348 8%
value tuple structural 17620.83 1336.83 8%
value tuple default 1439.33 1349.5 94%

@manofstick
Copy link
Contributor Author

2) https://gist.github.com/manofstick/04ba0c70c398bf5edeaba9b17d0b17c5

test original modified percent
mapTest 32-bit 18169 3356 18%
mapTest 64-bit 7414 4441 60%

@manofstick
Copy link
Contributor Author

3) https://gist.github.com/manofstick/bd374436a6d40218b2d836db34c494ca

test original modified percent
32-bit 77167 68278 89%
64-bit 142949 74615 52%

@manofstick
Copy link
Contributor Author

4) https://gist.github.com/manofstick/258edf7e7d39a76e9d1cdf0316ae2b47

test original modified percent
non-generic 32-bit 56360 24545 44%
generic 32-bit 117833 46421 39%
non-generic 64-bit 23651 18227 77%
generic 64-bit 44738 22051 49%

@manofstick
Copy link
Contributor Author

5) https://gist.github.com/manofstick/847922bcce2e2f47d3eca033ed9dc068

test original modified percent
32-bit 897.4 363 40%
64-bit 499.2 306.8 61%

@manofstick
Copy link
Contributor Author

6) https://gist.github.com/manofstick/b4fa5acc1abe3ca73a77a7eea12d205a

test original modified percent
32-bit 9707.8 575.8 6%
64-bit 3733.8 498.8 13%

@manofstick manofstick changed the title [WIP] [CompilerPerf] Extends #5112 ideas to Comparers (i.e >, >=, <, <= and LanguagePrimitives.FastGenericComparer) [CompilerPerf] Extends #5112 ideas to Comparers (i.e >, >=, <, <= and LanguagePrimitives.FastGenericComparer) Jul 13, 2018
@manofstick
Copy link
Contributor Author

@dsyme - I think this is done.

manofstick added a commit to manofstick/visualfsharp that referenced this pull request Aug 7, 2018
manofstick added a commit to manofstick/visualfsharp that referenced this pull request Aug 7, 2018
manofstick added a commit to manofstick/visualfsharp that referenced this pull request Aug 12, 2018
@KevinRansom
Copy link
Contributor

@dsyme , @manofstick , @cartermp -- what do we wnt to do with this PR? It looks beneficial, but the momentum just died on it!

Should I close it, or will we revisit it in the near future?

Thanks

Kevin

@manofstick manofstick closed this May 28, 2020
@KevinRansom
Copy link
Contributor

@manofstick you will still do these really cool PR's in the future right, I learn a ton looking through them :-)

@manofstick
Copy link
Contributor Author

@KevinRansom ha! well that's good! if I do have any more ideas I'll give 'em a crack, but I think most of my ideas are a bit too radical to get slurped upstream...

@KevinRansom
Copy link
Contributor

@manofstick , I am not so sure, I just think the rate of change of some stuff is so slow that FUD and real life(TM) gets in the way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area-Library Issues for FSharp.Core not covered elsewhere

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants