1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00
guile/benchmarks
Andy Wingo 068e0e5cdf Add benchmark for finalizers
Doesn't quite work on BDW yet.
2024-07-24 09:51:56 +02:00
..
ephemerons-embedder.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
ephemerons-types.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
ephemerons.c Allow embedder to request a major GC 2023-10-18 16:34:20 +02:00
finalizers-embedder.h Add benchmark for finalizers 2024-07-24 09:51:56 +02:00
finalizers-types.h Add benchmark for finalizers 2024-07-24 09:51:56 +02:00
finalizers.c Add benchmark for finalizers 2024-07-24 09:51:56 +02:00
heap-objects.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
mt-gcbench-embedder.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
mt-gcbench-types.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
mt-gcbench.c Fix optdebug warnings 2023-10-18 15:13:41 +02:00
quads-embedder.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
quads-types.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
quads.c Rework stats collection to use listener interface 2023-10-16 12:13:08 +02:00
README.md Reorganize source tree and document 2023-08-06 12:04:33 +02:00
simple-allocator.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
simple-gc-embedder.h Add finalizers 2024-07-23 22:33:29 +02:00
simple-roots-api.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
simple-roots-types.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00
simple-tagging-scheme.h Reorganize source tree and document 2023-08-06 12:04:33 +02:00

Benchmarks

  • mt-gcbench.c: The multi-threaded GCBench benchmark. An old but standard benchmark that allocates different sizes of binary trees. As parameters it takes a heap multiplier and a number of mutator threads. We analytically compute the peak amount of live data and then size the GC heap as a multiplier of that size. It has a peak heap consumption of 10 MB or so per mutator thread: not very large. At a 2x heap multiplier, it causes about 30 collections for the whippet collector, and runs somewhere around 200-400 milliseconds in single-threaded mode, on the machines I have in 2022. For low thread counts, the GCBench benchmark is small; but then again many Guile processes also are quite short-lived, so perhaps it is useful to ensure that small heaps remain lightweight.

    To stress Whippet's handling of fragmentation, we modified this benchmark to intersperse pseudorandomly-sized holes between tree nodes.

  • quads.c: A synthetic benchmark that allocates quad trees. The mutator begins by allocating one long-lived tree of depth N, and then allocates 13% of the heap in depth-3 trees, 20 times, simulating a fixed working set and otherwise an allocation-heavy workload. By observing the times to allocate 13% of the heap in garbage we can infer mutator overheads, and also note the variance for the cycles in which GC hits.

License

mt-gcbench.c was originally from https://hboehm.info/gc/gc_bench/, which has a somewhat unclear license. I have modified GCBench significantly so that I can slot in different GC implementations. Other files are distributed under the Whippet license; see the top-level README.md for more.