Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #30713
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "Chris M. Thomasson" <invalid@invalid.invalid> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Impact of implicit arrays... |
| Date | Thu, 23 Jun 2016 14:14:48 -0700 |
| Organization | n/a |
| Lines | 65 |
| Message-ID | <nkhjga$936$1@dont-email.me> (permalink) |
| References | <njhj52$hl3$1@gioia.aioe.org> <4a1c28ea-447b-4e9b-9c75-68ef85c379e7@googlegroups.com> <njq6qn$qc3$1@gioia.aioe.org> <a1db3c29-049f-44a0-ae2d-e6c38776ddd7@googlegroups.com> <nkccds$mm6$1@dont-email.me> <nkce18$7cu$1@solani.org> <nkcf21$3ca$1@dont-email.me> <nkcf7i$3ca$2@dont-email.me> <nkdna9$54f$1@solani.org> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Thu, 23 Jun 2016 21:14:50 -0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="98084a227c6f2f039ecddd7950c40a31"; logging-data="9318"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pARbK9slci5Tj2C2dLuwgd6B/Cn1s1Ig=" |
| User-Agent | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 |
| In-Reply-To | <nkdna9$54f$1@solani.org> |
| Cancel-Lock | sha1:+w73sNjaYu3v4StF7qSbrNendYE= |
| Xref | csiph.com comp.lang.javascript:30713 |
Show key headers only | View raw
On 6/22/2016 2:55 AM, Christoph M. Becker wrote:
> On 22.06.2016 at 00:31, Chris M. Thomasson wrote:
>
>> On 6/21/2016 3:28 PM, Chris M. Thomasson wrote:
>
>>> On 6/21/2016 3:10 PM, Christoph M. Becker wrote:
>>>
>>>> Then you might be interested in typed arrays, see, for instance,
>>>> <https://developer.mozilla.org/en/docs/Web/JavaScript/Typed_arrays>.
>>
>> Although, why should I use full blown dynamic arrays, when these types
>> arrays will work fine? Humm, they almost have to be more efficient in
>> this respect.
>
> I presume they're more efficient, but I've never used them so can't
> tell. Most likely there are multiple benchmarks available on the web,
> and of course, you could do your own.
>
Here is my first try at WebWorkers wrt a "benchmark" of the following
functions:
______________________________
function ct_functional_add_0(a, b)
{
return [a[0] + b[0], a[1] + b[1]];
}
function ct_intrusive_add_0(a, b)
{
a[0] += b[0];
a[1] += b[1];
return a;
}
______________________________
The code for the WebWorker can be found here:
http://funwithfractals.atspace.cc/ct_root/ct_ui/ct_test_worker.js
Along with a webpage here:
http://funwithfractals.atspace.cc/ct_root/ct_ui
You should probably hit refresh on your browser. Anyway, you should see
two buttons:
(Run Intrusive Test), and (Run Functional Test).
Click on one of them, and it runs 1,000,000,000 iterations on the
relevant function.
FWIW, I always seem to get the following results on average:
_____________________________________
The Intrusive Test Completed in 3500ms
The Functional Test Completed in 10000ms
_____________________________________
So, on my end, intrusive wins. Can you please give it a go and post the
results here?
BTW, does this even work for you?
Thanks! :^)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Impact of implicit arrays... "Chris M. Thomasson" <nospam@nospam.com> - 2016-06-11 10:52 -0700
Re: Impact of implicit arrays... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-12 12:16 +0200
Re: Impact of implicit arrays... "Chris M. Thomasson" <nospam@nospam.com> - 2016-06-13 12:23 -0700
Re: Impact of implicit arrays... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-13 22:00 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <nospam@nospam.com> - 2016-06-14 17:17 -0700
Re: Impact of implicit arrays... Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-06-15 06:55 +0200
Re: Impact of implicit arrays... "Chris M. Thomasson" <nospam@nospam.invalid> - 2016-06-14 22:19 -0700
Re: Impact of implicit arrays... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-18 12:47 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-21 14:43 -0700
Re: Impact of implicit arrays... "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-22 00:10 +0200
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-21 15:28 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-21 15:31 -0700
Re: Impact of implicit arrays... "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-06-22 11:55 +0200
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-23 12:23 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-23 14:14 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-23 14:16 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-23 18:14 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-23 18:46 -0700
Re: Impact of implicit arrays... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-21 17:35 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-21 21:08 -0700
Re: Impact of implicit arrays... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-21 23:09 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-23 14:38 -0700
Re: Impact of implicit arrays... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-24 07:16 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-06-25 18:03 -0700
Re: Impact of implicit arrays... "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-06-25 18:24 -0700
Re: Impact of implicit arrays... "Chris M. Thomasson" <invalid@invalid.invalid> - 2016-07-01 13:52 -0700
csiph-web