Hi!
> $ed.data.head($ed.data_size) Unfortunately, i get the error "Error X::AdHoc+{X::Await::Died}+{X::React::Died}: Don't know how many elements a C array returned from a library" > > my uint8 @data = $ed.data[0..$ed.data_size-1].Array; > > my Blob $bindata = Blob[uint8].new(@data); > > Afaict that's a total of five HLL element-by-element copies. > > I would expect this to work and be at least as fast and possibly a lot faster: > > my Blob $bindata .= new: $ed.data; Because of the error above, i have to do: my Blob $bindata .= new: $ed.data[^$ed.data_size]; which takes slightly more than 1 sec: Bindata in 1.1679568 Btw, the size of the $ed.data_size is 750K. Regards. David Santiago Ralph Mellor <ralphdjmel...@gmail.com> escreveu no dia terça, 16/06/2020 à(s) 23:08: > > > my Data $ed = await $yenc_promise; > > The promise must initialize each element of the CArray[uint]. It looks > pretty quick; I'm guessing it's low-level code doing that. > > > my uint8 @data = $ed.data[0..$ed.data_size-1].Array; > > my Blob $bindata = Blob[uint8].new(@data); > > Afaict that's a total of five HLL element-by-element copies. > > I would expect this to work and be at least as fast and possibly a lot faster: > > my Blob $bindata .= new: $ed.data; > > hth