New submission from STINNER Victor:

Attached patch modifies long_lshift() to allocate the result using calloc() 
instead of malloc(). The goal is to avoid allocating physical memory for the 
least significat digits (zeros). According to my tests in issue #21233 
(calloc), Linux and Windows have an optimized calloc() functions and at least 
Linux avoids allocating memory for pages initialized by zeros until pages at 
modified.

----------
files: long_lshift.patch
keywords: patch
messages: 217787
nosy: haypo, pitrou
priority: normal
severity: normal
status: open
title: Use calloc() instead of malloc() for int << int (lshift)
type: performance
versions: Python 3.5
Added file: http://bugs.python.org/file35135/long_lshift.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21419>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to