Code Monkey home page Code Monkey logo

sstypes's Introduction

Simple Smart Types is a library enriching functionality of native types

Links: NuGet, PerfDotNet

Summary

  • Contains SmartInt and SmartDouble types enriching native .NET types Int32 and Double
  • Fast string parsing
  • Special ToString and ToStringBuilder methods
  • Supports constant BadValue for all types
  • Fully compatible with native types Int32 and Double
  • Almost fully compatible with nullable types Int32? and Double?
  • Universal, save, and easy to use

Content

SSTypesLT

SSTypesLT is C# solution with tests and examples.

Documentation

Performance

The significant performance gain was achieved for string parse operations. ToString methods still require optimization.

Performance was measured by PerfDotNet. See PerfDotNet for details.

** Test environment for the tests performed **

BenchmarkDotNet=v0.9.1.0
OS=Microsoft Windows NT 6.1.7601 Service Pack 1
Processor=Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz, ProcessorCount=4
Frequency=2241298 ticks, Resolution=446.1700 ns
HostCLR=MS.NET 4.0.30319.42000, Arch=64-bit RELEASE [RyuJIT]

** String Parse for Double and SmartDouble **

        Method |        Median |     StdDev |

------------------ |-------------- |----------- | Parse_Double | 2,233.6640 us | 37.0084 us | Parse_SmartDouble | 576.6582 us | 9.8574 us |

** String Parse for 9-digit Int32 and SmartInt numbers **

             Method |     Median |    StdDev |

----------------------- |----------- |---------- | Parse_Int_9_Digit | 16.3008 ms | 0.2596 ms | Parse_SmartInt_9_Digit | 3.4532 ms | 0.0471 ms |

Durability

Durability is assured by unit tests included into solution.

Practical Implementation

The solution has been successfully used in GoMap.Az project. Data workflow load includes about 10 billions string-to-double parsing operations per day.

Acknowledgments

Thanks to the following people for their contributions:

[AndreyAkinshin] (https://github.com/AndreyAkinshin) for his advices regarding performance tests.

[Samir Salimkhanov] () for his advices regarding unit tests.

sstypes's People

Contributors

dgakh avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.