speed

package
v1.5.7 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MPL-2.0 Imports: 16 Imported by: 0

README

speed tests

Some (outdated) tests for comparison of serialization formats.

We wanted to explore possibilities for TL2 design, so tried many approaches, comparing with popular formats.

Also, here is an answers to questions:

  • Why don't you use flatbuffers or capnp approach for TL2 (answer: they are both large and slow to serialize)
  • Why TL2 only has 1 int and 3 length representations (answer: it is faster to read/write than 10, as msgpack and protobuf have)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONAppendPoint

func JSONAppendPoint(w []byte, item *point, writeExcessField bool) []byte

func JSONReadPoint

func JSONReadPoint(item *point, in *basictl.JsonLexer) error

func Json2ReadUint32

func Json2ReadUint32(in *jlexer.Lexer, dst *uint32) error

func MakeCapnpPoint

func MakeCapnpPoint(arena capnp.Arena, p point) []byte

func MakeFlatbuffersPoint

func MakeFlatbuffersPoint(fb *flatbuffers.Builder, p point) []byte

func ReadCapnpPoint

func ReadCapnpPoint(buf []byte) (p point)

func ReadFlatbuffersPoint

func ReadFlatbuffersPoint(buf []byte) (p point)

func TL2AppendLen

func TL2AppendLen(b []byte, u int64) []byte

func TL2StringLen

func TL2StringLen(u int) int

func TL2StringReadBytes

func TL2StringReadBytes(r []byte, dst *[]byte) ([]byte, error)

func TL2StringReadBytesRange

func TL2StringReadBytesRange(r []byte) (_ []byte, dst []byte, err error)

func TL2StringWrite

func TL2StringWrite(b []byte, s string) []byte

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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