-
Notifications
You must be signed in to change notification settings - Fork 30
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
Remove redundant abstract/virtual properties, only one is needed. #27
base: master
Are you sure you want to change the base?
Commits on Sep 5, 2017
-
Add ArrayPrimitiveTypeExpressionFactory.
When cloning Primitives all that needs to be done is copy the source array to the target array. Instead of calling the PrimitiveTypeExpressionFactory call for every element you can use the static Array.Copy method to assist. Depending upon the primitive type, the performance gain is different. In the tests I have, which are coded against 4.6.1, will have a performance gain of any where from about 98% to almost 225%. Byte Array, for whatever reason, has a performance gain of about 6800% ... I have no idea why byte arrays are so much different. Int Arrays go from about 2,386,634 ops per sec to 4,727,659 (98% increase) String arrays go from about 1,926,782 ops per sec to 5,730,086 (197% increase) TimeSpan arrays go from about 1,988,071 ops per sec to 4,650,697 (133% increase) DateTime arrays go from about 1,930,501 ops per sec to 4,210,105 (118% increase) Delegate arrays go from about 1,659,751 ops per sec to 5,404,864 (225% increase) Byte arrays go from about 58,083 ops per sec to 4,053,648 (6879% increase) I would like supply a unit test to easily display the difference in performance in the master project, but given the interface, it is not exactly straight forward. I generated the numbers above from running the changes suggested from a local release build in my current test setup.
Configuration menu - View commit details
-
Copy full SHA for 08db4fa - Browse repository at this point
Copy the full SHA 08db4faView commit details -
Configuration menu - View commit details
-
Copy full SHA for 867690b - Browse repository at this point
Copy the full SHA 867690bView commit details
Commits on Sep 6, 2017
-
In order to support polymorphism, we have to find the runtime type and run the appropriate CloneDelegate against the source object. I added the CloneIdDelegateCache to assist with this process. I needed to make a couple changes to the ComplexTypeExpression factory to add polymorphism support. In order to maintain backwards compatibility, if an initializer was supplied by the user, that should be used before the call to the new code. I added a new test class that asserts several scenarios, including the scenario outlined in issue MarcinJuraszek#7. Also in the new unit test, I added some SpeedComparions tests (which I commented out for integration purposes) to help give an idea of what type of performance hit this change will cause. Let me know what you think.
Configuration menu - View commit details
-
Copy full SHA for d2035d9 - Browse repository at this point
Copy the full SHA d2035d9View commit details
Commits on Sep 7, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 7e963d0 - Browse repository at this point
Copy the full SHA 7e963d0View commit details -
Supply a Expression factory for a List of primitives.
Similar to the Array of primitives, there is no need to call the clone method for primitivies. Since List is so common, providing a custom Expression factory should be quite useful. According to my testing, here are the performance differences: List of Strings: 22,815 ops per second ->1,111,000 (about 4700% increase) List of Bytes: 46,153 ops per second ->1,199,880 (about 2500% increase) List of Ints: 44,863 ops per second -> 990,000 (about 2100% increase) List of Delegates: 1,119,194 ops per second ->5,221,409 (about 365% increase) List of DateTime: 1,274,697 ops per second -> 4,629,166 (about 263% increase) List of TimeSpan: 1,251,564 ops per second -> 5,221,409 (about 317% increase) One thing I had to do in order to address an assertion made by the unit tests was to not clone the element is the Flag.CollectionItems was missing. Which I found surpising, should there be such an assertion of Arrays of items as well? Currently the Array expression factorys do not check flags at all.
Configuration menu - View commit details
-
Copy full SHA for 5984423 - Browse repository at this point
Copy the full SHA 5984423View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c7b379 - Browse repository at this point
Copy the full SHA 0c7b379View commit details
Commits on Sep 11, 2017
-
There is no need to clone any primitive types, they can be used direc…
…tly. This change set removes all cloning calls for primitives. Here is a incomplete summary of the performance changes (all figures are in operations per second). Clone an Array of classes: 18,761 ->26,702 (about 42% increase) Clone an Array of Structs: 27,461 ->40,526 (about 47% increase) Clone a simple class (all primitive properties): 1,973,684 -> 2,918,287 (about 47% increase) Clone a complex class: 1,776,198 -> 2,056,202 (about 15% increase) Clone a Class:List<Class>: 0.999 -> 1.176 (about 17% increase) Clone a Class:List<int>: 1.608 -> 3.115 (about 93% increase) Clone a KeyValue<int,int>: 9,569,377 -> 14,903,129 (about 55% increase) Clone a Tuple<int,int>: 3,992,015 -> 10,033,444 (about 151% increase) Clone a Nullable<int>: 19,607,843 -> 33,025,099 (about a 68% increase)
Configuration menu - View commit details
-
Copy full SHA for b5475f7 - Browse repository at this point
Copy the full SHA b5475f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd91db2 - Browse repository at this point
Copy the full SHA fd91db2View commit details
Commits on Sep 12, 2017
-
I am not sure if this is considered a bug or not, but Tuples are clas…
…ses. I added Check for nulls. Add them to the cloned object dictionary and reuse them if found. Added unit tests to verify this functionality.
Configuration menu - View commit details
-
Copy full SHA for c4fb91f - Browse repository at this point
Copy the full SHA c4fb91fView commit details
Commits on Sep 28, 2017
-
Configuration menu - View commit details
-
Copy full SHA for efefcf4 - Browse repository at this point
Copy the full SHA efefcf4View commit details -
Configuration menu - View commit details
-
Copy full SHA for af1740c - Browse repository at this point
Copy the full SHA af1740cView commit details
Commits on Oct 23, 2017
-
Revert "Leverage backing fields for automatic properties."
This reverts commit af1740c.
Configuration menu - View commit details
-
Copy full SHA for b02b431 - Browse repository at this point
Copy the full SHA b02b431View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c9fda4 - Browse repository at this point
Copy the full SHA 2c9fda4View commit details
Commits on Oct 24, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 681565d - Browse repository at this point
Copy the full SHA 681565dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed144b5 - Browse repository at this point
Copy the full SHA ed144b5View commit details
Commits on Oct 25, 2017
-
Configuration menu - View commit details
-
Copy full SHA for 8f164a9 - Browse repository at this point
Copy the full SHA 8f164a9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6978185 - Browse repository at this point
Copy the full SHA 6978185View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfcf8d6 - Browse repository at this point
Copy the full SHA bfcf8d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3464307 - Browse repository at this point
Copy the full SHA 3464307View commit details -
Configuration menu - View commit details
-
Copy full SHA for b75a355 - Browse repository at this point
Copy the full SHA b75a355View commit details
Commits on Nov 1, 2017
-
Remove redundant abstract/virtual properties. Use extension functions…
… to find the correct fields/properties.
Configuration menu - View commit details
-
Copy full SHA for 977eed9 - Browse repository at this point
Copy the full SHA 977eed9View commit details