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

Added benchmark comparisons to Cistern.Linq #11

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

manofstick
Copy link

@manofstick manofstick commented Sep 28, 2019

Cistern.Linq is an alternative implementation of Linq-to-objects. It uses no runtime code generation, rather contains a different implementation reminiscent of Nessos Streams yet retaining compatibility with Linq-to-Objects (as well as a layer to F#'s Seq).

Benchmark times for c# are included in this file (part of this PR), where although LinqOptimizer pulls ahead for very large collections, it can be seen that the Cistern implementation is mostly faster than System.Linq even for very modest collections.

The F# benchmarks are here (no parallel code is currently implemented, and I currently don't have any plans):

"Sum Seq":      00:00:00.9151123
"Sum Cistern":  00:00:00.2923889
"Sum Opt":      00:00:00.3903759
Validate 1v2 : True
Validate 1v3: True

"Sum Squares Seq":      00:00:03.0134003
"Sum Squares Cistern":  00:00:00.3735728
"Sum Squares Opt":      00:00:00.3681706
Validate 1v2 : True
Validate 1v3: True

"Cartesian Seq":        00:00:10.8245149
"Cartesian Cistern":    00:00:04.0599107
"Cartesian Linq Opt":   00:00:00.5041083
Validate 1v2 : True
Validate 1v3: True

"Group Seq":       00:00:10.9423902
"Group Cistern":   00:00:09.0466331
"Group Opt":       00:00:09.2406504
Validate 1v2 : True
Validate 1v3: True

"Pythagorean Seq":      00:00:07.9351571
"Pythagorean Cistern":  00:00:02.8860682
"Pythagorean Opt":      00:00:00.1650265
Validate 1v2 : True
Validate 1v3: True

Cistern.Linq is not finished. Still quite a bit of work actually as I clean up all the edges and expand validation, but it's but it's got stubs to existing code to provide full API coverage.

To simplify things it's just .net standard 2.1 / .net core 3.0

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