Closed shua closed 5 months ago
Just ran a benchmark, and it does seem to show an improvement (for a sufficiently high number of concat
s in the same running program)
Run with a single call in the benchmark, there is no measurable improvement, but with 1,000,000 calls in a single benchmark, the results are
bench-group_wall-time/Benchmarking "listConcatUtf8"
time: [8.1329 ms 8.1724 ms 8.2099 ms]
change: [-59.891% -59.676% -59.444%] (p = 0.00 < 0.05)
Performance has improved.
Found 1 outliers among 200 measurements (0.50%)
1 (0.50%) high mild
This is looking good. Just need to resolve CI issues.
@Anton-4 any idea why xcrun
might be missing?
= note: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
cargo test-gen-llvm-wasm --locked --release
failed with:
test gen_list::list_concat_utf8 ... FAILED
Call parameter type does not match function signature!
%str.RocStr %"#arg2"
ptr call void @roc_builtins.list.concat_utf8(ptr noalias nocapture nonnull sret(%list.RocList) %list_alloca, ptr nocapture nonnull readonly %list_alloca1, %str.RocStr nocapture nonnull readonly %"#arg2"), !dbg !993
define internal fastcc %list.RocList @List_concatUtf8_6b9d2d153924c8f8a993721e2b812757c4eec621dcc2108756cfa755bec(%list.RocList %"#arg1", %str.RocStr %"#arg2") !dbg !989 {
entry:
%list_alloca1 = alloca %list.RocList, align 8
%list_alloca = alloca %list.RocList, align 8
store %list.RocList %"#arg1", ptr %list_alloca1, align 4, !dbg !993
call void @roc_builtins.list.concat_utf8(ptr noalias nocapture nonnull sret(%list.RocList) %list_alloca, ptr nocapture nonnull readonly %list_alloca1, %str.RocStr nocapture nonnull readonly %"#arg2"), !dbg !993
%load_list = load %list.RocList, ptr %list_alloca, align 4, !dbg !993
ret %list.RocList %load_list, !dbg !993
}
There were some network issues with the CI machines, I restarted the failed jobs now.
The intent of this change is to implement a
Str.concatUtf8
builtin which allows a string to be concatenated to aList U8
as utf-8 encoded bytes. The motivation for this change is #3251 .