Skip to content
This repository has been archived by the owner on Feb 18, 2019. It is now read-only.
/ dtoa.nim Public archive

Port of Milo Yip's fast dtoa() implementation

Notifications You must be signed in to change notification settings

LemonBoy/dtoa.nim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

dtoa

Convert a double value to a string.

A straightforward port of Milo Yip's fast dtoa implementation used in RapidJson.

This implementation is tailored for speed and uses Grisu2 as its underlying algorithm: this means that there's a small where the output won't be represented in its most compact form.

The resulting string is guaranteed to round-trip.

FAQ

What's wrong with $?

The dtoa provided by this library is much faster than $, you can run the benchmark by yourself by running:

nimble install criterion
nim c -d:release -r bench.nim

And since it doesn't depend on the underlying libc implementation its output is guaranteed to be the same across different platforms/os.

What about float?

I don't need them at the moment, if you do please open a ticket.

About

Port of Milo Yip's fast dtoa() implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages