Re: Bug fix for $((x**y)) algorithm on 64+ bits machines.

2011-09-19 Thread Nicolas ARGYROU
I'm ok with using Bash's licence. - Original Message - From: William Park opengeome...@yahoo.ca To: Nicolas ARGYROU na...@yahoo.com Cc: bashbug bug-bash@gnu.org Sent: Monday, September 19, 2011 3:33 AM Subject: Re: Bug fix for $((x**y)) algorithm on 64+ bits machines

Re: Bug fix for $((x**y)) algorithm on 64+ bits machines.

2011-09-19 Thread Nicolas ARGYROU
, and one to hold the result. Writing the same algoritm with assembler language can save a few instructions per loop, because gcc doesn't catch that it can use the out-going bit of y to directly jump over xy *= x; if not set. But it won't be portable then. Best regards,   Nicolas Argyrou

Re: Bug fix for $((x**y)) algorithm on 64+ bits machines.

2011-09-17 Thread Nicolas ARGYROU
I'm glad it pleases you. I'm amazed also how fast it deals with large numbers. Feel free to use it. :) I came up with a version that is slightly more precise in the comments, and that uses 3 registers instead of 4 (though gcc can optimize that): // Copyright 2011: Nicolas Argyrou na

Re: Bug fix for $((x**y)) algorithm on 64+ bits machines.

2011-09-17 Thread Nicolas ARGYROU
,   Nicolas Argyrou - Original Message - From: Dave Rutherford d...@evilpettingzoo.com To: Nicolas ARGYROU na...@yahoo.com Cc: Sent: Saturday, September 17, 2011 10:34 PM Subject: Re: Bug fix for $((x**y)) algorithm on 64+ bits machines. On Sat, Sep 17, 2011 at 07:10, Nicolas ARGYROU na

Bug fix for $((x**y)) algorithm on 64+ bits machines.

2011-09-16 Thread Nicolas ARGYROU
2011: Nicolas Argyrou na...@yahoo.com, public domain. templatetypename T inline T ipow(register T x, register T y) {     if (x == 0 y != 0) return 0;     // 1: ipow(x,y) = x ** y = Product [i=0; ilog2(y)] (x ** (((yi)1)*2**i))     // 2: x**(2**i) = x**(2**(i-1)) * x**(2**(i-1))     register T X = x

Re: Bash-4.0-rc1 available for FTP

2009-01-31 Thread Nicolas
shell (and running my .bashrc) now takes around 0.4s, while it took 0.6s with Bash 3.2. This is enough to feel a difference! Nicolas

Re: Possible eval builtin speedup?

2008-03-10 Thread Nicolas
to U0x5c. */ If so, why isn't it corrected to wchar.h? Regards, Nicolas

Re: Possible eval builtin speedup?

2008-03-07 Thread Nicolas Bonifas
Thanks for your answer. I assume you know that the speed issues most likely come from the operating system's supporting functions like the fork() and exec*() family members? How does it explain the speed difference between echo `dircolors` and dircolors ?

Re: Possible eval builtin speedup?

2008-03-06 Thread Nicolas Bonifas
it is more than 20 times faster than using command substitution. So, do you think that speeding up command substitution would be a difficult task? Regards, Nicolas

Possible eval builtin speedup?

2008-03-02 Thread Nicolas Bonifas
, Nicolas