Skip to content

Instantly share code, notes, and snippets.

View monkoose's full-sized avatar
👽
...

monkoose monkoose

👽
...
View GitHub Profile
@monkoose
monkoose / rounding.d
Created June 28, 2025 14:34
Stress test file for matchparen-like plugins
/** This is a submodule of $(MREF std, math).
It contains several functions for rounding floating point numbers.
Copyright: Copyright The D Language Foundation 2000 - 2011.
D implementations of floor, ceil, and lrint functions are based on the CEPHES math library, which is Copyright (C) 2001 Stephen L. Moshier
$(LT)steve@moshier.net$(GT) and are incorporated herein by permission of the author. The author reserves the right to distribute this
material elsewhere under different copying permissions. These modifications are distributed here under the following terms:
License: $(HTTP www.boost.org/LICENSE_1_0.txt, Boost License 1.0). Authors: $(HTTP digitalmars.com, Walter Bright), Don Clugston,
Conversion of CEPHES math library to D by Iain Buclaw and David Nadlinger Source: $(PHOBOSSRC std/math/rounding.d)
*/
@monkoose
monkoose / trim_bench.lua
Created May 20, 2025 07:41
trim benchmark
local function benchmark(func, ...)
func(...)
local start = os.clock()
local result = func(...)
local elapsed = os.clock() - start
print(string.format("Time: %.3f ms", elapsed * 1000))
end