Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: String concatenation (join++)

by thekostya (Initiate)
on Mar 16, 2016 at 09:47 UTC ( [id://1157923]=note: print w/replies, xml ) Need Help??


in reply to Re: String concatenation (join++)
in thread String concatenation

You forgot one more method of concatenation via substr.


1. substr($a, length($a), 0, $b);
or
2. substr($a, length($a)) = $b;

This concatenation is faster for very long strings.

For string size 10 - 100 symbols fastest way is $a . $b and join

For string size ~1 Mb fastest ways join, substr and $a.$b

For strings size ~1Gb :) fastest ways are substr, strange method "@{[$a, $b]}" :) and join

Join has good speed for all variants.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1157923]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-25 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found