bench

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2026 License: BSD-3-Clause Imports: 0 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bench has a few trivial functions used to compare the per-call overhead of gopy's backends (GOPY_BACKEND); see bench.py and the "benchmark" job in .github/workflows/ci.yml. Not part of the test suite itself: no _examples/bench entry in main_test.go's features map.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(i, j int) int

Add returns the sum of its arguments: the cheapest possible call, to isolate per-call FFI overhead from any argument-marshaling cost.

func Concat

func Concat(a, b string) string

Concat concatenates two strings: a second data point, since string arguments/returns cross the boundary very differently from an int (a managed buffer + length or a null-terminated copy, depending on the backend) and might not share the int case's relative cost.

Types

This section is empty.

Jump to

Keyboard shortcuts

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