[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2019-03-20 Thread STINNER Victor
STINNER Victor added the comment: Hum, after reading again my previous, I'm not sure that my intent was clear. I'm fine with Stefan rejecting the optimization. He is the maintainer of decimal. I just wanted to comment what he said ;-) -- ___

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2019-03-20 Thread STINNER Victor
STINNER Victor added the comment: > Also, the performance improvements are in argument parsing, but not when you > have numerical code like a * b, where a and b are already decimals. If the function call takes around 100 ns, the benefit of FASTCALL and the new more efficient function to

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2019-03-20 Thread Stefan Krah
Stefan Krah added the comment: Thanks, but it is still not going to happen. Look at the increased code size in e.g. blake2s_impl.c.h. I want to know what is going on in the code. Also, the performance improvements are in argument parsing, but not when you have numerical code like a * b,

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2019-03-19 Thread Ma Lin
Ma Lin added the comment: > AC will not happen: It makes the module too large and unreadable. AC has great performance improvements these days: issue35582 and issue36127 It's quite worthy of reconsidering this decision. -- nosy: +Ma Lin ___ Python

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2018-05-29 Thread STINNER Victor
STINNER Victor added the comment: Sorry, I lost interest in this optimization. If someone wants to work on it, please open a new issue. -- resolution: -> out of date stage: -> resolved status: open -> closed ___ Python tracker

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-06-27 Thread Stefan Krah
Stefan Krah added the comment: I think I'll wait until #29464 is committed and the API is considered frozen (see msg295176?). -- ___ Python tracker ___

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-06-27 Thread STINNER Victor
STINNER Victor added the comment: So Stefan: what do you want to do? Use FASTCALL or not? :-) I would prefer to not wait until the beta if you are ok to use FASTCALL. Note: it seems like bpo-29464 is going to be approved ;-) -- ___ Python tracker

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-02-06 Thread STINNER Victor
STINNER Victor added the comment: Oh ok, it seems like Serhiy wants to change METH_FASTCALL. I didn't know :-) He just opened the issue #29464: "Specialize FASTCALL for functions with positional-only parameters". Interesting idea. -- ___ Python

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-02-06 Thread STINNER Victor
STINNER Victor added the comment: > If the API can still change (msg287083), I think I'll wait with this until > shortly before 3.7 beta. I do not understand why Serhiy keeps repeating that the API is going to change, I have no such plan. IMHO the FASTCALL API is now very well defined:

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-02-06 Thread Stefan Krah
Stefan Krah added the comment: If the API can still change (msg287083), I think I'll wait with this until shortly before 3.7 beta. -- ___ Python tracker

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-29 Thread Raymond Hettinger
Raymond Hettinger added the comment: >> Ah you dislike the additional [clinic input] sections? > > Yes, they tear apart the code. I stopped reading many C files because > of this. I concur with Stefan. AC is very impactful on modules, greatly affecting their readability and maintainability.

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-27 Thread Stefan Krah
Stefan Krah added the comment: > STINNER Victor added the comment: > > AC will not happen: It makes the module too large and unreadable. > > Ah you dislike the additional [clinic input] sections? Yes, they tear apart the code. I stopped reading many C files because of this. Brett asked why

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-27 Thread STINNER Victor
STINNER Victor added the comment: Stefan Krah: > AC will not happen: It makes the module too large and unreadable. Ah you dislike the additional [clinic input] sections? It's kind of strange when you have to convert existing code, when once the code uses AC, I prefer AC to separated

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > What is the status of Argument Clinic? Is it something "public" or not? No, it is for for internal CPython use only. It lacks some features (support of var-positional and var-keyword parameters, optional parameters without default value), the syntax of

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-27 Thread Stefan Krah
Stefan Krah added the comment: I'll take a look when I have the opportunity. AC will not happen: It makes the module too large and unreadable. -- ___ Python tracker

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-27 Thread STINNER Victor
STINNER Victor added the comment: Oops, I forgot to attach decimal-2.patch, here you have. > I would dissuade from direct using of FASTCALL, but Argument Clinic is enough > reliable. I wrote decimal-2.patch in a few minutes, when I was trying to find all functions still calling

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I would dissuade from direct using of FASTCALL, but Argument Clinic is enough reliable. I would recommend to use Argument Clinic unless Stefan supports external fork of the decimal module and is limited by public API. --

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-27 Thread STINNER Victor
STINNER Victor added the comment: Hello, I'm back! :-) I almost abandonned my the tp_fastcall change (#29259). print() now uses FASTCALL (#29296), it already made bm_telco faster: https://speed.python.org/timeline/#/?exe=5=telco=1=50=off=on=on (see the speedup around January 16 at the right)

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-17 Thread STINNER Victor
STINNER Victor added the comment: Raymond Hettinger: "This should not go in without Stephan Krah's approval. This code is finely tuned and carefully arrang" Sure, that's why I opened this issue. Serhiy Storchaka: "See msg207652 in issue20177." Oh, I didn't know that Stefan Krah already

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: This should not go in without Stephan Krah's approval. This code is finely tuned and carefully arranged. -- assignee: -> skrah nosy: +rhettinger ___ Python tracker

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See msg207652 in issue20177. -- ___ Python tracker ___ ___

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-17 Thread STINNER Victor
STINNER Victor added the comment: Oh wait, I'm not sure that attached patch has a significant impact on performances. It seems like the speedup mostly comes from the print patch: http://bugs.python.org/issue29296#msg285668 But well, it is still interesting to use METH_FASTCALL in decimal ;-)

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-17 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue29301] decimal: Use FASTCALL and/or Argument Clinic

2017-01-17 Thread STINNER Victor
New submission from STINNER Victor: I'm currently working on the isuse #29259: "Add tp_fastcall to PyTypeObject: support FASTCALL calling convention for all callable objects". I used bm_telco of the performance benchmark suite to check which functions still require to create a temporary tuple