- CPU: Ryzen 7 5700G (Zen3)
- RAM: 16 GiB
- DISK: SSD 470GiB (format: btrfs)
- SO: ArchLinux (last upd installed: 20-05-2024)
Original post: kubo39/gist 🇯🇵
A cache algorithm called [SIEVE][sieve-website] was announced in 2023. It claims to be simpler than LRU, and indeed it is a fairly simple algorithm, but it is said to perform as well as existing superior cache algorithms such as S3-FIFO and TinyLFU.
updated: https://godbolt.org/z/fqT37xGPM - add Dlang and fix c++ initialize_list
Not installed .NET
# D betterC
Benchmark 1 (121 runs): ./structmem_rs
Zig toolchain [forked] uses LLVM codegen for mos target.
Current version:
- Zig: v0.13.0-dev (bootstrap fork)
- LLVM: v18.0.0 (llvm-fork)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../zig-bootstrap/out/zig-x86_64-linux-musl-baseline/zig build -Dtarget=native-native-msvc -DBUILD_SHARED_LIBS=true -Ddisable_handle_fork=false -Denable_cplusplus=true -Denable_gc_assertions=true -Denable_gc_debug=true -Denable_large_config=false -Denable_munmap=true -Denable_parallel_mark=false -Denable_redirect_malloc=false -Denable_rwlock=true -Denable_thread_local_alloc=true -Denable_threads=true -Denable_werror test -fwine | |
steps [5/43] zig build-exe initfromthreadtest Debug native-native-msvc... Created 205 threads (174 ended) | |
GC_check_heap_block: found 1 smashed heap objects: | |
0x79c926ed4db8 in or near object at 0x79c926ed4d90 (/app/bdwgc/tests/smash.c:34, sz= 40) | |
Call chain at allocation: | |
steps [12/43] zig build-exe realloctest Debug native-native-msvc... Heap size: 65536 | |
Heap size: 131072 | |
sh: 1: /usr/bin/addr2line: not found | |
/app/bdwgc/zig-cache/o/ed2c75516bbcd33b227e2d90c7f211f1/libgc.so(+0x4596b) [0x79c9272a596b] | |
/app/bdwgc/zig-cache/o/ed2c75516bbcd33b227e2d90c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
<insert_a_suppression_name_here> | |
Memcheck:Cond | |
fun:GC_push_all_eager | |
fun:GC_with_callee_saves_pushed | |
fun:UnknownInlinedFun | |
fun:GC_push_roots.lto_priv.0 | |
fun:GC_mark_some | |
fun:GC_stopped_mark | |
fun:GC_try_to_collect_inner.lto_priv.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on: https://modm.io/guide/installation/ | |
FROM ubuntu:latest | |
RUN apt-get update && \ | |
apt-get install -y \ | |
python3 \ | |
python3-pip \ | |
scons \ | |
cmake \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
/// Zig version. When writing code that supports multiple versions of Zig, prefer | |
/// feature detection (i.e. with `@hasDecl` or `@hasField`) over version checks. | |
pub const zig_version = std.SemanticVersion.parse(zig_version_string) catch unreachable; | |
pub const zig_version_string = "0.12.0-dev.xtensa.2858+8e52bb152"; | |
pub const zig_backend = std.builtin.CompilerBackend.stage2_llvm; | |
pub const output_mode = std.builtin.OutputMode.Obj; | |
pub const link_mode = std.builtin.LinkMode.Static; | |
pub const is_test = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// replacing https://github.com/vitasdk/samples/blob/master/hello_world/src/main.c | |
const c = @cImport({ | |
@cInclude("psp2/kernel/processmgr.h"); | |
@cInclude("psp2/kernel/threadmgr.h"); | |
@cInclude("stdio.h"); | |
@cInclude("debugScreen.h"); | |
@cDefine("printf", "psvDebugScreenPrintf"); | |
}); | |
pub export fn main() c_int { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GDExtension - zig (v0.11.0 or master) binding | |
// cmd: godot --dump-gdextension-interface -q --headless | |
// based on: https://github.com/godot-dlang/godot-dlang/blob/master/gdextension_interface.h | |
const std = @import("std"); | |
pub const GDExtensionVariantType = enum(c_uint) { | |
GDEXTENSION_VARIANT_TYPE_NIL = 0, | |
GDEXTENSION_VARIANT_TYPE_BOOL = 1, | |
GDEXTENSION_VARIANT_TYPE_INT = 2, | |
GDEXTENSION_VARIANT_TYPE_FLOAT = 3, |
NewerOlder