Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Optimise adder Date: Fri, 22 May 2015 10:41:22 +0100 Organization: A noiseless patient Spider Lines: 16 Message-ID: <871ti9j6f1.fsf@bsb.me.uk> References: <874mn6m0tt.fsf@bsb.me.uk> <140fbc59-9fd9-41dd-bcb5-55b8c304e5b8@googlegroups.com> <87vbfllxxb.fsf@bsb.me.uk> <69862aa5-cdf8-4d22-beca-c37c59b90e63@googlegroups.com> <87egm9lpmh.fsf@bsb.me.uk> <2823f00c-b09d-45df-b14c-5eadf3d141b8@googlegroups.com> <87382pll4i.fsf@bsb.me.uk> <5c25f904-8d8f-46e9-8366-d8263c30f23a@googlegroups.com> <87fv6pjzn2.fsf@bsb.me.uk> <29bf48fc-683e-49c9-8620-9099866254a2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="27949"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/4MBbfYwo5RnS4mlufTbB0kCXmfcipujk=" Cancel-Lock: sha1:o9GnORglwtzP4A/kX0Hl0HrnGvU= sha1:nKe1VWyVo0Y+Ch0Zg41mlNprdnc= X-BSB-Auth: 1.edb737b43f5721f74615.20150522104122BST.871ti9j6f1.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:27810 jonas.thornvall@gmail.com writes: > But when base is an array you have to shift approach and use the > functions arrCompare and naiveSub. > > I am not 100% sure i could program it, because it get very convoluted > with the function calls i don't think it is recursion, but a nested > structure. Your use of globals makes it almost impossible. A re-write is essential to make any progress. The trouble is, the people who know how to program it also know it's not worthwhile programming it. -- Ben.