Re: Create a string with (n) copies of the same character
- From: Dr J R Stockton <jrs@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 24 Sep 2007 22:15:11 +0100
In microsoft.public.scripting.jscript message <uerSa2s$HHA.3916@TK2MSFTN
GP02.phx.gbl>, Mon, 24 Sep 2007 12:08:59, Dave Anderson
<NPQRWPDWZGSP@xxxxxxxxxxxxx> posted:
"Dr J R Stockton" wrote:
For shortish strings, yours is faster. For longish strings,
mine is much faster...
Isn't that assessment entirely implementation-dependent?
No. Not entirely.
[O(N) discussion trimmed]
That only addresses your second assertion. I agree that yours is O(log
N). No need to specify base 2, as I'm sure you know.
Indeed; I was only refuting the "entirely".
You can do your own tests, in your browsers, with
<URL:http://www.merlyn.demon.co.uk/js-tests.htm#Speed>, Big String
Speed.
--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 MIME.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/&c., FAQqy topics & links;
<URL:http://www.merlyn.demon.co.uk/clpb-faq.txt> RAH Prins : c.l.p.b mFAQ;
<URL:ftp://garbo.uwasa.fi/pc/link/tsfaqp.zip> Timo Salmi's Turbo Pascal FAQ.
.
- 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: Dave Anderson
- 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: Dave Anderson
- Create a string with (n) copies of the same character
- Prev by Date: Re: How to optimize this JavaScript?
- Next by Date: Re: returnin arrays from COM to JScript
- 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):
Loading