Hi Bee!
On Di, 07 Aug 2012, Bee wrote:
> Hello Bram
>
> These do the same thing:
> let @/ = @/ . pad[c]
> let @/ .= pad[c]
>
> Is there an advantage (speed? resources?) to use one rather the other?
> That is, other than less typing.
I don't think there is an advantage of using one over the other.
Using :Timer¹ here are some non-representative statistics:
10000Timer exe 'let g:a.="foobar"'|let g:a=''
10000 rounds: 0.08 sec
1 round : 8.08e-6 sec
10000Timer exe 'let g:a=g:a."foobar"'|let g:a=''
10000 rounds: 0.07 sec
1 round : 7.41e-6 sec
>
> :set allows a pre-pend as ^= as well as ap-pend with .=
>
> :let has only ap-pend with .=
Could be a nice addition.
¹)http://vim.wikia.com/wiki/Time_your_Vim_commands
regards
Christian
--
Der Verständige regiert nicht, aber der Verstand; nicht der
Vernünftige, sondern die Vernunft.
-- Goethe, Maximen und Reflektionen, Nr. 150
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php