[issue33199] PyDict_Copy() can leave 'ma_version_tag' uninitialized

2018-04-01 Thread pdox
New submission from pdox : PyDict_Copy leaves 'ma_version_tag' uninitialized when the dictionary being copied has a split table. -- components: Interpreter Core messages: 314768 nosy: pdox priority: normal severity: normal status: open title: PyDict_Copy() can leave '

[issue31921] Bring together logic for entering/leaving a frame in frameobject.c

2017-11-05 Thread pdox
Change by pdox : -- resolution: -> rejected ___ Python tracker <https://bugs.python.org/issue31921> ___ ___ Python-bugs-list mailing list Unsubscrib

[issue31921] Bring together logic for entering/leaving a frame in frameobject.c

2017-11-05 Thread pdox
pdox added the comment: Raymond, this is not an experiment, but the beginning of a sustained effort to improve locality during execution, to make more effective use of CPU cache lines. Rather than discuss the details of this change one PR at a time, I will close this issue for now, and open

[issue31921] Bring together logic for entering/leaving a frame in frameobject.c

2017-11-02 Thread pdox
Change by pdox : -- keywords: +patch pull_requests: +4195 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31921> ___ ___ Python-

[issue31921] Bring together logic for entering/leaving a frame in frameobject.c

2017-11-02 Thread pdox
New submission from pdox : This is a refactor to move all the code involved in entering a frame (making it the active frame for the current tstate) and leaving a frame (removing it as an active frame, possibly destructing it or making it GC tracked) into private functions in frameobject.c

[issue31857] Make the behavior of USE_STACKCHECK deterministic

2017-10-23 Thread pdox
Change by pdox : -- keywords: +patch pull_requests: +4069 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue31857> ___ ___ Python-

[issue31857] Make the behavior of USE_STACKCHECK deterministic

2017-10-23 Thread pdox
New submission from pdox : USE_STACKCHECK is a Windows-only feature which provides additional safety against C stack overflow by periodically calling PyOS_CheckStack to determine whether the current thread is too close to the end of the stack. The way USE_STACKCHECK ensures that

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-15 Thread pdox
pdox added the comment: serhiy.storchaka: 1) Where tp_as_number would normally be NULL, instead it would point to a fixed PyNumberMethods structure containing the default functions. This would make the memory increase negligible, as all non-number types would use the same structure. 2) If

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-14 Thread pdox
pdox added the comment: I believe it would also make sense to inline the 'as' structures (tp_as_async, tp_as_number, tp_as_sequence, tp_as_mapping, and tp_as_buffer), instead of having them be pointers. This would save one pointer dereference with each use. But this woul

[issue31791] Ensure that all PyTypeObject fields are set to non-NULL defaults

2017-10-14 Thread pdox
New submission from pdox : Ensure that every function pointer in every PyTypeObject is set to a non-NULL default, to spare the cost of checking for NULL with every use. As a basic example, consider PyNumber_Negative: PyObject * PyNumber_Negative(PyObject *o) { PyNumberMethods *m; if

[issue31785] Move instruction code from ceval.c to a separate file

2017-10-14 Thread pdox
pdox added the comment: rhettinger, helper functions used by the instruction code would also be moved into instructions.h (e.g. call_function, do_call_core, cmp_outcome, etc). Done properly, there should be very little need to move between instructions.h and ceval.c to understand what is

[issue31785] Move instruction code from ceval.c to a separate file

2017-10-13 Thread pdox
Change by pdox : -- title: Move instruction code blocks to separate file -> Move instruction code from ceval.c to a separate file ___ Python tracker <https://bugs.python.org/issu

[issue31785] Move instruction code blocks to separate file

2017-10-13 Thread pdox
New submission from pdox : I'd like to move all instruction code (the code inside a TARGET(NAME) block) from Python/ceval.c to a new file, Python/instructions.h. The new file will contain only instruction bodies (prefixed by related helper functions/macros). Eval-context macros (e.g. T

[issue31622] Make threading.get_ident() return an opaque type

2017-10-13 Thread pdox
pdox added the comment: I don't see much enthusiasm or agreement here, so I'm closing for now. -- resolution: -> postponed stage: -> resolved status: open -> closed ___ Python tracker <https://bugs

[issue31596] expose pthread_getcpuclockid in time module

2017-10-05 Thread pdox
pdox added the comment: This looks specific to FreeBSD and s390x. Those platforms might not provide the same cpu-time clock consistency guarantees as Linux+glibc+x86. Would it be ok to just disable the ordering check for those systems

[issue31622] Make threading.get_ident() return an opaque type

2017-10-02 Thread pdox
pdox added the comment: If we don't want to change the type of get_ident(), there is another option. We could have PyThread keep track of which thread ids (e.g. pthread_t) values are valid (meaning, the thread is still running). This could be tracked in a global data structure (protect

[issue31622] Make threading.get_ident() return an opaque type

2017-09-28 Thread pdox
New submission from pdox : Currently, Python exposes "thread identifiers" as unsigned long values across multiple modules: threading.get_ident() -> Returns an integer thread id sys._current_frames() -> Dictionary keys are integer thread ids signal.pthread_kill() -> Accepts a

[issue31596] expose pthread_getcpuclockid in time module

2017-09-26 Thread pdox
New submission from pdox: time.clock_gettime() makes it possible to retrieve the thread-specific cpu-time clock for the current thread using time.CLOCK_THREAD_CPUTIME_ID. However, it is currently not possible in Python to retrieve the thread-specific clock for other threads. Exposing