Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #39914

Re: Loop optimisation.

From The Natural Philosopher <tnp@invalid.invalid>
Newsgroups comp.lang.javascript
Subject Re: Loop optimisation.
Date 2021-04-12 23:16 +0100
Organization A little, after lunch
Message-ID <s52grf$vki$1@dont-email.me> (permalink)
References (1 earlier) <5jq37gd23tnrtbnffci51j0pluo6o55ig8@4ax.com> <s4uj91$h3l$1@dont-email.me> <m9067g52dgp82u6fr2qnq1i50r38tip8t9@4ax.com> <9cd9abc2-9d2d-4f60-9214-db1ffae1e90dn@googlegroups.com> <cev87ghtmoval1ivpme1qm6l3fud3nl8or@4ax.com>

Show all headers | View raw


On 12/04/2021 18:05, John G Harris wrote:
> On Sun, 11 Apr 2021 07:38:21 -0700 (PDT), "Michael Haufe (TNO)" 
> <tno@thenewobjective.com> wrote:
> 
>> On Sunday, April 11, 2021 at 9:03:51 AM UTC-5, John G Harris
>> wrote:
>>> On Sun, 11 Apr 2021 11:33:04 +0100, The Natural Philosopher 
>>> <t...@invalid.invalid> wrote:
>>> 
>>> <snip>
>>>> I have a ms or so to run a 256 cycle iteration with quite a lot
>>>> of FP potentially
>>>> 
>>>> However my basic audio code seems stutter free on a crap mobile
>>>> phone running firefox, on android, so there is plenty of hope.
> 
>>> You're doing real time code in a web browser, using a language
>>> that assumes an autonomous garbage collector! You've picked the
>>> wrong tools to do the job. And next year a cart horse will win
>>> the Derby.
>> 
>> JavaScript is fine for this. The Garbage Collector does not run
>> entirely in the same thread [1]. You will *maybe* have a 5ms pause
>> or less. That's assuming there is garbage to be collected in the
>> first place.
>> 
>> "Programmers waste enormous amounts of time thinking about, or
>> worrying about, the speed of noncritical parts of their programs,
>> and these attempts at efficiency actually have a strong negative
>> impact when debugging and maintenance are considered. We should
>> forget about small efficiencies, say about 97% of the time:
>> premature optimization is the root of all evil. Yet we should not
>> pass up our opportunities in that critical 3%." -- Donald Knuth
> 
> All very true, but I'm talking about chunks of code that have a hard 
> deadline. If you measure it and it's close to the limit then you
> can't afford to have unspecified, unquantified, uncontrollable
> hiccups. This is especially so with write once, run everywhere,
> code.
> 
> Of course, if hiccups are acceptable then it's not a problem, nor is 
> that a reason for complaining about the language.
> 
My complaint is less about JavaScript, than the fashionable approach 
that insists that just because they learnt it and CompSci school every 
API must now consist of objects and classes - mostly ill thought out and 
obscure - that defy clear documentation, and make the job of actually 
using them almost impossible.

Why does Jquery exist? To cover up the shit that is the underlying 
horror of the DOM and the language implementations.



> John
> 


-- 
Renewable energy: Expensive solutions that don't work to a problem that
doesn't exist instituted by self legalising protection rackets that
don't protect,  masquerading as public servants who don't serve the public.

Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Loop optimisation. The Natural Philosopher <tnp@invalid.invalid> - 2021-04-10 18:41 +0100
  Re: Loop optimisation. John G Harris <niam@jghnorth.org.uk.invalid> - 2021-04-10 19:14 +0100
    Re: Loop optimisation. The Natural Philosopher <tnp@invalid.invalid> - 2021-04-11 11:33 +0100
      Re: Loop optimisation. John G Harris <niam@jghnorth.org.uk.invalid> - 2021-04-11 15:03 +0100
        Re: Loop optimisation. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-04-11 07:38 -0700
          Re: Loop optimisation. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-11 13:36 -0700
          Re: Loop optimisation. John G Harris <niam@jghnorth.org.uk.invalid> - 2021-04-12 18:05 +0100
            Re: Loop optimisation. The Natural Philosopher <tnp@invalid.invalid> - 2021-04-12 23:16 +0100
              Re: Loop optimisation. Jonas Thörnvall <jonas.thornvall@gmail.com> - 2021-04-13 05:19 -0700
                Re: Loop optimisation. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-04-13 06:21 -0700
        Re: Loop optimisation. The Natural Philosopher <tnp@invalid.invalid> - 2021-04-12 01:36 +0100
          Re: Loop optimisation. John G Harris <niam@jghnorth.org.uk.invalid> - 2021-04-12 18:04 +0100
            Re: Loop optimisation. The Natural Philosopher <tnp@invalid.invalid> - 2021-04-12 23:09 +0100
              Re: Loop optimisation. John G Harris <niam@jghnorth.org.uk.invalid> - 2021-04-13 20:08 +0100
                Re: Loop optimisation. The Natural Philosopher <tnp@invalid.invalid> - 2021-04-13 21:41 +0100
                Re: Loop optimisation. John G Harris <niam@jghnorth.org.uk.invalid> - 2021-04-14 18:24 +0100
  Re: Loop optimisation. Kristjan Robam <he12457@hotmail.com> - 2021-04-10 13:36 -0700
    Re: Loop optimisation. The Natural Philosopher <tnp@invalid.invalid> - 2021-04-11 11:34 +0100
  Re: Loop optimisation. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-04-10 22:22 -0700
    Re: Loop optimisation. The Natural Philosopher <tnp@invalid.invalid> - 2021-04-11 11:36 +0100
    Re: Loop optimisation. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-04-14 02:20 +0200
      Re: Loop optimisation. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-04-14 06:48 -0700
        Re: Loop optimisation. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-04-14 17:31 +0200
          Re: Loop optimisation. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-04-14 18:00 +0200
            Re: Loop optimisation. The Natural Philosopher <tnp@invalid.invalid> - 2021-04-14 19:25 +0100
            Re: Loop optimisation. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-04-14 23:10 +0200
              Re: Loop optimisation. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-04-17 09:45 -0700
            Re: Loop optimisation. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-04-17 09:43 -0700
              Re: Loop optimisation. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2021-04-17 21:45 +0200
                Re: Loop optimisation. Scott Sauyet <scott.sauyet@gmail.com> - 2021-04-18 19:06 -0700
          Re: Loop optimisation. "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2021-04-17 08:50 -0700

csiph-web