Re: Create a string with (n) copies of the same character
- From: "Anthony Jones" <Ant@xxxxxxxxxxxxxxxx>
- Date: Sat, 22 Sep 2007 09:11:42 +0100
"Dr J R Stockton" <jrs@xxxxxxxxxxxxxxxxxx> wrote in message
news:5CmvgXeYwD9GFw8X@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In microsoft.public.scripting.jscript message <urk523B$HHA.4584@TK2MSFTN
GP03.phx.gbl>, Fri, 21 Sep 2007 08:06:55, Anthony Jones
<Ant@xxxxxxxxxxxxxxxx> posted:
"Dr J R Stockton" <jrs@xxxxxxxxxxxxxxxxxx> wrote in message
news:mheYoFE8Lm8GFwEr@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
For shortish strings, yours is faster. For longish strings, mine is
much faster. For intermediate strings, it probably depends on the
number of "1" bits in the binary integer representation of the length.
Define 'longish'.
Where do the (char count by time) lines cross for the two approaches?
Now that certainly will be implementation-dependent. Test it yourself,
it's easy enough. For my purpose, I only tried a few sizes.
Where in your testing did the lines cross? I won't hold you to them honest
I'd just like to know what your results are in your testing.
--
Anthony Jones - MVP ASP/ASP.NET
.
- 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: Anthony Jones
- Re: Create a string with (n) copies of the same character
- From: Dr J R Stockton
- 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: How to optimize this JavaScript?
- 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