Git Product home page Git Product logo

refloat's Introduction

Refloat

Go Reference

Float parser that sacrifices nothing.

gopher.png

Features

  • Accurate. It finds the "best" approximation to the input just like the standard library, strconv. Fuzzing tests in addition to standard library tests and parse-number-fxx-test-data are actively done.

  • Compatible. Basically, it is an improvement on ParseFloat in the standard library, and the usage is exactly the same.

  • Fast. Faster than the standard library on benchmarks with normally distributed floats and bitwise uniform random float inputs. For more information, benchmark it yourself or see below.

Installation

go get github.com/sugawarayuuta/refloat

Benchmarks

gantt
title norm = normally distributed, bits = bitwise uniform (ns/op - lower is better)
todayMarker off
dateFormat  X
axisFormat %s
section bits 64bit 
strconv: 0,106
refloat: 0,91
section norm 64bit 
strconv: 0,92
refloat: 0,65
section bits 32bit 
strconv: 0,79
refloat: 0,80
section norm 32bit 
strconv: 0,65
refloat: 0,49
Loading

Articles

There are articles written in English and Japanese.

Thank you

The icon above is from gopher-stickers by Ueda Takuya.

Awesome talk and inspirational algorithm by Daniel Lemire.

Sollya is used for precomputing the polynomial for approximations.

refloat's People

Contributors

sugawarayuuta avatar ludi317 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.