parsetemp

package
v0.0.0-...-5b377e2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

https://www.reddit.com/r/golang/comments/xv9yyv/strconvparsefloat_faster_altrernatives/

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseNumber

func ParseNumber(data []byte) int64

ParseNumber reads decimal number that matches "^-?[0-9]{1,2}[.][0-9]" pattern, e.g.: -12.3, -3.4, 5.6, 78.9 and return the value*10, i.e. -123, -34, 56, 789. From: https://github.com/gunnarmorling/1brc/blob/db064194be375edc02d6dbcd21268ad40f7e2869/src/main/go/AlexanderYastrebov/calc.go#L261C1-L283C2

func ParseTempBigFloat

func ParseTempBigFloat(s string) float64

func ParseTempFloat

func ParseTempFloat(s string) float64

func ParseTempToInt

func ParseTempToInt(p []byte) int

ParseIntoInt parses a string containing a fixed precision (e.g. "10.2") float into an int (e.g. 102).

func ParseTempToIntShift

func ParseTempToIntShift(p []byte) int

ParseIntoIntShift parses a string containing a fixed precision (e.g. "10.2") float into an int (e.g. 102).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL