develooper Front page | perl.perl6.users | Postings from June 2020

Re: Help converting CArray[uint8] to Blob

Thread Previous | Thread Next
David Santiago
June 17, 2020 17:01
Re: Help converting CArray[uint8] to Blob
Message ID:

That what i was looking for, i changed the code to:

my Instant $init =;
my Blob $blob = blob-from-carray($, size=>$ed.data_size);
say "bindata =  {$init}";


Bindata= 0.00060054

So it passed from approx 1.1 to 0.0006 secs. That's quite an improvement!

Thank you so much.

Best regards,
David Santiago

Ralph Mellor <> escreveu no dia quarta,
17/06/2020 à(s) 11:57:
> > 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"
> I googled the error message and got a bunch of matches including this:
> This will show the way to maximize the speed because it minimizes
> the *number* of copy operations (to one) and expense of the copy
> (by making it native code).
> hth

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About