First contact with open .NET
Completed on 13-Feb-2016 (47 days) -- Updated on 19-Nov-2016

Project 7 in full-screenProject 7 in PDF
Improvements >
Introduction

As already explained, I firstly came with the idea for this project after some interactions with the .NET community about decimal.Parse. ParseNumber is the method in charge of performing most of the string-analysis actions which are triggered when calling decimal.Parse/decimal.TryParse (or Parse/TryParse of any other numeric type). The main goal of this project is to come up with a more efficient version of ParseNumber (& related methods). Although most of my efforts have been focused on decimal (i.e., big proportion of the performance-comparison tests), I also considered other input situations (i.e., accounting for additional types in a few performance tests to confirm the decimal conclusions or when doing the final CoreRun.exe-based validation with ParseNumber_Validation.exe).

The whole optimisation process wasn't too easy; but setting up a reliable performance-comparison framework was much more difficult, as explained in the sections of the previous part (Preliminary ideas, Testing approaches & Definitive tests). I also found various issues whose effects on performance were proven less important than expected; all of them are included in the next section.

The pulled modifications were thoroughly tested under different conditions and confirmed to improve the performance of ParseNumber (and, consequently, of all the .NET numerical-type parsing methods). Additionally to getting lots of valuable insights into various issues (e.g., code optimisation of unsafe C# and performance measurements under extreme conditions), I also realised about some limitations in the current parsing methodology (what represented an additional confirmation of the need of the upcoming decimal.TryParseExact).