Skip to content

Instantly share code, notes, and snippets.

View 1bardesign's full-sized avatar

Max Cahill 1bardesign

View GitHub Profile
--[[
"semi-manual" garbage collection
specify a time budget and a memory ceiling per call.
called once per frame, this will spread any big collections
over a couple of frames, and "catch up" when there is. This
keeps GC burden much more predictable.
The memory ceiling provides some level of "relief valve" - if
--sort core
--
-- stable sorting routines for lua
--
--based on MIT licensed code from Dirk Laurie and Steve Fisher
--license as follows:
--[[
Copyright © 2013 Dirk Laurie and Steve Fisher.