Re: [Python-Dev] More compact dictionaries with faster iteration

2015-01-01 Thread Maciej Fijalkowski
On Wed, Dec 31, 2014 at 3:12 PM, Serhiy Storchaka  wrote:
> On 10.12.12 03:44, Raymond Hettinger wrote:
>>
>> The current memory layout for dictionaries is
>> unnecessarily inefficient.  It has a sparse table of
>> 24-byte entries containing the hash value, key pointer,
>> and value pointer.
>>
>> Instead, the 24-byte entries should be stored in a
>> dense table referenced by a sparse table of indices.
>
>
> FYI PHP 7 will use this technique [1]. In conjunction with other
> optimizations this will decrease memory consumption of PHP hashtables up to
> 4 times.

"up to 4 times" is a bit of a stretch, given that most of their
savings come from:

* saving on the keeping of ordering
* other optimizations in zval

None of it applies to python

PHP does not implement differing sizes of ints in key dict, which
makes memory saving php-only (if we did the same thing as PHP, we
would save more or less nothing, depending on how greedy you are with
the list overallocation)

We implemented the same strategy in PyPy as of last year, testing it
to become a default "dict" and "OrderedDict" for PyPy in the next
release.

Cheers,
fijal

PS. I wonder who came up with the idea first, PHP or rhettinger and
who implemented it first (I'm pretty sure it was used in hippy before
it was used in Zend PHP)
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Google search labels Python 2.7 docs as Python 3.4

2015-01-01 Thread Wes Turner
Might one or more sitemap.xml files be useful here, if theoretically
unnecessary?

* https://github.com/vladris/tinkerer-contrib/blob/master/sitemap/sitemap.py
* https://en.wikipedia.org/wiki/Sitemaps

On Wed, Dec 31, 2014 at 10:26 PM, Vincent Davis 
wrote:

> About a year ago I posted about this or related issue, Here is the link
> .
> This was the old website (I think, but that may not appliy to the docs) but
> I think the issue is still probably related to the robot.txt file.
>
> Vincent Davis
> 720-301-3003
>
> On Wed, Dec 31, 2014 at 8:03 PM, Chris Angelico  wrote:
>
>> On Thu, Jan 1, 2015 at 12:24 PM, Benjamin Peterson 
>> wrote:
>> > On Wed, Dec 31, 2014, at 19:32, Ryan Gonzalez wrote:
>> >> Not sure if this is something to post here...but...
>> >>
>> >> [image: Inline image 1]
>> >
>> > That must be some sort of inconsistency in Google's index, since the
>> > actual page's title is correct.
>>
>> This issue has persisted for a while. I first noticed it in early
>> December (though it may have been there longer), and ignored it on the
>> assumption that it was a transitional state. I don't know how long a
>> transitional state can last, though.
>>
>> ChrisA
>> ___
>> Python-Dev mailing list
>> [email protected]
>> https://mail.python.org/mailman/listinfo/python-dev
>> Unsubscribe:
>> https://mail.python.org/mailman/options/python-dev/vincent%40vincentdavis.net
>>
>
>
> ___
> Python-Dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe:
> https://mail.python.org/mailman/options/python-dev/wes.turner%40gmail.com
>
>
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Google search labels Python 2.7 docs as Python 3.4

2015-01-01 Thread Oleg Broytman
On Thu, Jan 01, 2015 at 01:49:52AM -0600, Wes Turner  
wrote:
> Might one or more sitemap.xml files be useful here, if theoretically
> unnecessary?
> 
> * https://github.com/vladris/tinkerer-contrib/blob/master/sitemap/sitemap.py
> * https://en.wikipedia.org/wiki/Sitemaps

   I'd rather recommend http://goog-sitemapgen.sourceforge.net/

Oleg.
-- 
 Oleg Broytmanhttp://phdru.name/[email protected]
   Programmers don't die, they just GOSUB without RETURN.
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com