Thanks for the answer. There's a slight performance improvement, but It still takes more than 1 second: Code: my Instant $init3 = DateTime.now().Instant; #my Blob $bindata = Blob[uint8].new(@data); my Blob $bindata = Blob[uint8].new($ed.data[^$ed.data_size]); say "Bindata in {DateTime.now.Instant - $init3}"; Bindata in 1.1250962 :-( Curt Tilmes <curt@tilmes.org> escreveu no dia terça, 16/06/2020 à(s) 21:40: > > On Tue, Jun 16, 2020 at 5:18 PM David Santiago <demanuel@gmail.com> wrote: > > my uint8 @data = $ed.data[0..$ed.data_size-1].Array; > > my Blob $bindata = Blob[uint8].new(@data); > > Not absolutely sure, but it seems like you are copying the data twice. > Try just > > my $bindata = Blob.new($ed.data[^$ed.data_size]);Thread Previous | Thread Next