move code size benchmark to separate directory

This commit is contained in:
Michael Sippel 2025-02-16 17:25:23 +01:00
parent cea1f36e63
commit 24e28e7bb5
Signed by: senvas
GPG key ID: F96CF119C34B64A6
6 changed files with 13 additions and 71 deletions

View file

@ -0,0 +1,24 @@
morph_array_as_valterm_to_lenpfx (Terminator:x86.UInt8)
<Seq~<ValueTerminated Terminator> x86.UInt8>
--> <Seq~<LengthPrefix x86.UInt64> x86.UInt8>
```
length_prefix_uint8_array_clear(dst);
while( *src != Terminator ) {
length_prefix_uint8_array_push(dst, *src);
src++;
}
return 0;
```
morph_array_as_lenpfx_to_valterm (Terminator:x86.UInt8)
<Seq~<LengthPrefix x86.UInt64> x86.UInt8>
--> <Seq~<ValueTerminated Terminator> x86.UInt8>
```
for( uint64_t i = 0; i < src->len; ++i ) {
*dst ++ = src->items[i];
}
*dst = Terminator;
return 0;
```