Bill Allombert on Mon, 27 Nov 2023 14:12:52 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: #matr~ vs ##matr (and: arity, questenian and !!)
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: #matr~ vs ##matr (and: arity, questenian and !!)
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Mon, 27 Nov 2023 14:12:46 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1701090767; c=relaxed/relaxed; bh=afKnSd3TkBHhCCYlrIAhqQE9tP+C1uBqJMB15L3jWaA=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; b=0BriIXBArn/1HHUl4OkvDj92MyniGQ/CyCeDplpJXlKsAHXI9UFEyklCHmMdKIF8ovbnmTNLaDtTdccYA7h8hknKjS76vxHlufpxL8zKZlLpbWCuIBdsjpsTvLsufcOo/WVIuP8C07vEK/Oy/AWGIO0mWDMaVjb98gRMYxPyy0SYXAdCnisJYMNof/TtMgA55v73Nn7X4JeaoFECpl9daEp/FZiZSdbyjdF4PuzNMhDLi9tSa65BZ+fohxiePPLDt/YjsWLgFIy5BZtHO9iUL7jDGgjf8KqnulXO3vlwK6KVG0BmL3Vi84huZbuvIG/FpvW0RepkAfEcLAGBuJ7joxyHmuQCoQi7QIlTbXO6RJpnYkMLOc2Mak0tzb7XUgL+WHBg8JeKYTgktlwpF40AngzK98UH08dMBDQIvsNUXNrm3t6QLyDvFNFHVFpI7foWfq0hz4Rd9UqlG6efIvGfk3ArZP5s3DZg9eGYyXHHrnIYyONHtK+3v6YVlgO1hlcPQgxOIJ/ciShAGjAIgIrGtnkA/k0fmbp3zAdT2ipP8g/Ij6VOblS6x6r07hnS1cHY6wAzdPzky8n9MmQarWC5zthctgIJ9NypXJUKJKkSXDe4f9WRvz0HCXZGfdWnMocfgHZOykVmlohGGDAa/yP++d/Jn9T/wZi8DALEK2JBPeQ=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1701090767; cv=none; b=bF9B41buE6CTSRVoJX6gD3k2Gd6vP37vcEZZSr+v+EXtRHthMhyStCVdZa3usovFFJ7h+KSpDN00NPIhXcxeNDCHMncbOigp9ILpZNpegtYs1LgMp4QfdnSYhZhgXqN87X4jr0dz7e8LkOmm5DAlttoFYy1C/7SER8C7D62/lIJ8ljUBbNnt7WVDRKgMKWyiOU3hTTJXVYo3oWC8C4fw1YawWYVT9dc22LOCDWrM0SMUSH4WrxvxbLz3K+iaP8l5vSKBAFasreabpLueI5j4/Wehj7hhfHg5fcfOFVG8pC/q3J9eUCu5IVrcgioSGYsmRlEj9nYDU2xdo+Yplv61lMOYdDPs5lYZ+wSYVLTAfojiAJejN8KvTH8lpNoRrf35RPIkq8AQrAEOkBLm57j6HXf4IBrV31oMQdhkGmicW4RwJUFOeYCxkmTgUtbNOZjTISZgU/6epOVIYldiIWP62iSykErEbqCzDesojguPECqBmBaVum8SfgGkAQipqpWHfzfdIZRJdGZ4lVWvfbgqaik/rOPdK/7S+0hFoNDlhCEu2X2l8en20iJ/K1dT31QBFdzhsAGf2bhq1tMEJKB1/08SWQeHbBo+1bih/UsTCe/0DaYzdfTBcj6KfiDtp25Zpbom6/OEavqTkwJeIOKiVsHaU2p0exH1VBmIO7XsZ+A=
- Authentication-results: smail; arc=none
- Delivery-date: Mon, 27 Nov 2023 14:12:52 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1701090767; bh=afKnSd3TkBHhCCYlrIAhqQE9tP+C1uBqJMB15L3jWaA=; h=Date:From:To:Subject:References:In-Reply-To:From; b=ZjcB1J1jBg6ihpE4BzgIW3lGWTTa233vDVglau+TtQ4gnG9fgUumHw6Q0rEQSMing E9Pxb5EFh+YhNfDcDWLu3I8CgHqQ5lSmGFpCiN3ZsYcQsyAeqv12w2NIMTkJPwg0jo yE+kEjp9FMZCusWUDPbehsTPqZkO/+rG1kXAiF6MaIovFZjrS1g2TtZIjTMAAgsTza oZ3yfcGsMwsTEOWrTiZpzGWImRdv/JfSRWTOvt1/vy1CFccu0ChjsYXw/L0nhTGUKi S+sti9o7sqP/8LwQN+Px2AmvByTnJfRFpILaGIk/QreT36/0A/THCIVi82gYSrxcmf def5dy1p2+a2AyjXnlDcVt4TZdu/Ow2SFcrqjQYb6aUrWMTSHOCQ92NrBB8yr59RuC sTeoPwNSnMWTHTD2F1lCNNcPtC/xZsXDX11s2pZyPWSMpjFa6UwpvJBhng6dE2wdRE oi4O77Odkjhk2t7z7Cac2dMPCe3Szd8wtFOiNgsz7Y/dBZ+C51fjhMGN60RjgCuuPU ScgQsoupro5VYx37oatkZvCYBTp7UACsHTK7GzfL4wkY9u4wz5K40oVRlFBACv702z QpFvy3vNDoVZHkifbwKb3vvoFuxBb0RvBhR6cnDZVsxrrKO5BIl9LJbfWyvQryamWG 6yhhlQjb1TTdioLAbpiAFRYQ=
- In-reply-to: <ZWQRkHqLoM9M3tN2@login.math.berkeley.edu>
- Mail-followup-to: pari-dev@pari.math.u-bordeaux.fr
- References: <20210205134643.ihupkp7klxab4cxb@math.berkeley.edu> <20210205135448.rm5xdgmlsfjmty3z@math.berkeley.edu> <ZWQRkHqLoM9M3tN2@login.math.berkeley.edu>
On Sun, Nov 26, 2023 at 07:48:32PM -0800, Ilya Zakharevich wrote:
> On Fri, Feb 05, 2021 at 05:54:48AM -0800, Ilya Zakharevich wrote:
> > On Fri, Feb 05, 2021 at 05:46:43AM -0800, Ilya Zakharevich wrote:
> > > Is not it desirable to implement ##matr as an (optimized) synonym for #matr~?
> > >
> > > If the answer to the second question is positive, then one can maybe
> > > improve things by returning a special value (such as -1) for scalars…
> >
> > Well, to get things yet simpler, one can make ###x to return 0 for
> > scalars, 1 for vectors/lists and 2 for matrices.
>
> Taking all these things together, I think that in the best of the
> worlds one would have these:
>
> #mattr~ optimized in the compiler to (an equivalent to) (matsize(mattr))[1]
This one will not break backward compatibility while being easy to do.
See the new branch bill-translength.
? M=matrix(200,201,i,j,random(2^200));
? for(i=1,1000,#M~)
*** last result computed in 0 ms.
instead of
*** last result: cpu time 485 ms, real time 486 ms.
Cheers,
Bill