You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I made a simple reimplementation of the Generate functions, since I saw that the Generate for multiple objects simply executes Enumerable.Range(1, count).Select(i => Generate(ruleSets)).ToList();. I got a speedup of roughly 90 times simply by creating a helper function and reusing objects. Also I got a 200x improvement in memory consumption and zero Gen1 GC.
The workaround would be simply reimplement the Generate functions to reuse the "cleanRules", "createRule" variables and create a new context for each element
Could you help with a pull-request?
Yes
The text was updated successfully, but these errors were encountered:
Description
I made a simple reimplementation of the Generate functions, since I saw that the Generate for multiple objects simply executes
Enumerable.Range(1, count).Select(i => Generate(ruleSets)).ToList();
. I got a speedup of roughly 90 times simply by creating a helper function and reusing objects. Also I got a 200x improvement in memory consumption and zero Gen1 GC.LINQPad Code Example
The benchmark code is as below
What alternatives have you considered?
The workaround would be simply reimplement the Generate functions to reuse the "cleanRules", "createRule" variables and create a new context for each element
Could you help with a pull-request?
Yes
The text was updated successfully, but these errors were encountered: