Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the most efficient way to join two instances of ByteArray?

I want to join two instance of ByteArray in Squeak, Cuis or Pharo Smalltalk

b := #[10 11 12 13] asOrderedCollection.
b addAll: #[21 22 23 24].
b asByteArray

Are there more efficient ways to do this?

like image 718
z-- Avatar asked Dec 11 '22 18:12

z--


1 Answers

Would concatenation be better...?

#[10 11 12 13],#[21 22 23 24 ]
like image 82
Thushar G R Avatar answered May 12 '23 21:05

Thushar G R