Re: Create a string with (n) copies of the same character
- From: Dr J R Stockton <jrs@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 21 Sep 2007 23:01:16 +0100
In microsoft.public.scripting.jscript message <Xns99B261836715Feejj99@19
4.109.133.242>, Fri, 21 Sep 2007 07:35:10, Evertjan. <exjxw.hannivoort@i
nterxnl.net> posted:
what about:
L>>1
for
L/2
?
In itself it seems to be at least 3 times as fast:
Agreed, though that does limit the size of the string <g> ; but for
every L/2 there is a call to BigCat and a T + T, so it will make little
difference.
BTW, ISTM that using a while (n--) type of loop would reduce your
timing overhead.
It's a good idea to read the newsgroup c.l.j and its FAQ. See below.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
.
- References:
- Create a string with (n) copies of the same character
- From: \(O\)enone
- Re: Create a string with (n) copies of the same character
- From: Evertjan.
- Re: Create a string with (n) copies of the same character
- From: Evertjan.
- Re: Create a string with (n) copies of the same character
- From: Dr J R Stockton
- Re: Create a string with (n) copies of the same character
- From: Evertjan.
- Create a string with (n) copies of the same character
- Prev by Date: Re: Create a string with (n) copies of the same character
- Next by Date: Re: Create a string with (n) copies of the same character
- Previous by thread: Re: Create a string with (n) copies of the same character
- Next by thread: Re: Create a string with (n) copies of the same character
- Index(es):
Relevant Pages
|
Loading