interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / qualification / security673 / resources / measure.om

95 lines · 1921 bytes Raw Blame History
1note 63 paired samples of100 reserve/commit/reclaim cycles, same state/token/vector.
2note Baseline uses trusted unchecked scalar mutation, not a safe implementation.
3note Nanoseconds per100 cycles; host scheduling noise remains. No service throughput claim.
4text title "MEASURE helper cycles=100 samples=63 baseline_ns p50/p95/p99 then checked_ns p50/p95/p99\n"
5text samples "RAW paired samples: baseline_ns then checked_ns, 63 pairs in execution order\n"
6text nl "\n"
7global digits uchar 32
8fn number n ulong to void
9p = ulong 32
10while gt n 9 bound 20
11p = sub p 1
12put digits p add uchar rem n 10 48
13n = div n 10
14end
15p = sub p 1
16put digits p add uchar n 48
17w = write 1 digits p sub 32 p
18w = write 1 nl 0 1
19end
20fn order a edit ulong 63 to void
21for i ulong 63
22for j ulong 62
23if gt get a j get a add j 1
24v = get a j
25put a j get a add j 1
26put a add j 1 v
27end
28end
29end
30end
31fn cycles s edit ulong 64 t edit ulong 8 q view ulong 8 checked bool to bool
32for k ulong 100
33put t 1 get s 56
34put t 2 add get s 59 1
35if checked
36if ne rv_reserve s t q 0 0
37ret false
38end
39if ne rv_commit s t q true true 0
40ret false
41end
42if ne rv_reclaim s t q true true 0
43ret false
44end
45else
46for d ulong 8
47put s add 16 d get q d
48put s add 8 d add get s add 8 d get q d
49put s add 8 d sub get s add 8 d get q d
50put s add 16 d 0
51end
52put s 56 add get s 56 1
53put s 59 get t 2
54end
55end
56ret true
57end
58fn main to int
59s = new ulong 64 0
60t = new ulong 8 0
61q = new ulong 8 4
62a = new ulong 63 0
63b = new ulong 63 0
64if ne setup s 6 0
65ret 1
66end
67token t 0 1 1
68for i ulong 63
69start = monons
70if not cycles s t q false
71ret 2
72end
73put a i ulong sub monons start
74start = monons
75if not cycles s t q true
76ret 3
77end
78put b i ulong sub monons start
79end
80w = write 1 samples 0 len samples
81for i ulong 63
82number get a i
83number get b i
84end
85order a
86order b
87w = write 1 title 0 len title
88number get a 31
89number get a 59
90number get a 62
91number get b 31
92number get b 59
93number get b 62
94ret 0
95end