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


Groups > comp.lang.javascript > #27792

Re: Optimise adder

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.javascript
Subject Re: Optimise adder
Date 2015-05-21 17:04 +0100
Organization A noiseless patient Spider
Message-ID <87vbfllxxb.fsf@bsb.me.uk> (permalink)
References <a93ee3a0-39f5-408b-9f33-8d193e22e0dc@googlegroups.com> <874mn6m0tt.fsf@bsb.me.uk> <140fbc59-9fd9-41dd-bcb5-55b8c304e5b8@googlegroups.com>

Show all headers | View raw


jonas.thornvall@gmail.com writes:

> Den torsdag 21 maj 2015 kl. 17:01:39 UTC+2 skrev Ben Bacarisse:
>> jonas.thornvall@gmail.com writes:
>> 
>> > Feel free try to make it faster
>> 
>> Optimising bad code is not an appealing project.
>> 
>> The correct plan is to re-write it as a proper function and, what's
>> more, make it a function that operates on some big number object type.
>> 
>> > but still keep it general "anybase".
>> 
>> It does not seem to permit any base.  You claimed to be allowing
>> arbitrary precision numbers as the base, but the code assumes that the
>> base is an ECMAScript Number value.
>> 
>> <snip>
>> -- 
>> Ben.

Is there any chance that I can persuade you to follow Usenet conventions
and (1) snip signatures; (2) reply in-line to the points being made?

> Actually it is infinite precision arithmetic, i have no idea what you
> mean you simply feed it two times if you want decimals, and carry over
> a 1 if to the second add if needed. There is no extra penalty in time
> for that. The decimals Points is handled by the parser.
>
> It permit anybase, but you have to format your number into that base
> Before feeding the function, try base two.

The code you posted does not permit any base.

The discussion would be more productive if you addressed the points made
rather than quoting the full message and the adding something that you
feel is relevant at the end.  I explain exactly why your code does not
permit any base and exactly why I though that was a key part of your
project.  You did not address either of these points.

-- 
Ben.

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


Thread

Optimise adder jonas.thornvall@gmail.com - 2015-05-21 07:19 -0700
  Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-21 16:01 +0100
    Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 08:43 -0700
    Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 08:54 -0700
      Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-21 17:04 +0100
        Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 09:13 -0700
          Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-21 20:01 +0100
            Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 12:39 -0700
              Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-21 21:43 +0100
            Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 12:52 -0700
              Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-21 21:40 +0100
                Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 14:30 -0700
                Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-22 00:10 +0100
                Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 23:20 -0700
                Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-22 10:45 +0100
                Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-22 02:56 -0700
                Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-22 11:25 +0100
                Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-22 04:37 -0700
                Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-22 13:21 +0100
                Re: Optimise adder Denis McMahon <denismfmcmahon@gmail.com> - 2015-05-22 18:14 +0000
                Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 23:24 -0700
                Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-22 01:18 -0700
                Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-22 10:41 +0100
                Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-22 02:52 -0700
                Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-22 13:17 +0100
                Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-22 05:59 -0700
                Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-22 17:37 +0100
                Re: Optimise adder Denis McMahon <denismfmcmahon@gmail.com> - 2015-05-22 18:17 +0000
                Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-22 12:58 -0700
                Re: Optimise adder "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-23 00:08 +0200
                Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-22 10:38 +0100
      Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 09:05 -0700
        Re: Optimise adder Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-05-21 20:03 +0100
  Re: Optimise adder "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-21 22:51 +0200
    Re: Optimise adder jonas.thornvall@gmail.com - 2015-05-21 15:26 -0700
      Re: Optimise adder "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-22 13:40 +0200
      Re: Optimise adder Scott Sauyet <scott.sauyet@gmail.com> - 2015-05-26 06:20 -0700
        Re: Optimise adder jonas.thornvall@gmail.com - 2015-06-06 04:01 -0700
          Re: Optimise adder jonas.thornvall@gmail.com - 2015-06-06 04:09 -0700
            Re: Optimise adder jonas.thornvall@gmail.com - 2015-06-06 04:15 -0700
              Re: Optimise adder jonas.thornvall@gmail.com - 2015-06-06 05:33 -0700

csiph-web