Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #104137 > unrolled thread

even faster heaps

Started by"Sven R. Kunze" <srkunze@mail.de>
First post2016-03-06 14:59 +0100
Last post2016-03-06 14:59 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  even faster heaps "Sven R. Kunze" <srkunze@mail.de> - 2016-03-06 14:59 +0100

#104137 — even faster heaps

From"Sven R. Kunze" <srkunze@mail.de>
Date2016-03-06 14:59 +0100
Subjecteven faster heaps
Message-ID<mailman.242.1457272796.20602.python-list@python.org>
Hi python-list, hi Srinivas,

I managed to implement the mark&sweep approach for fast removal from 
heaps. This way, I got three pleasant results:

1) a substantial speed up!
2) an improved testsuite
3) discovery and fixing of several bugs

@Srinivas I would be honored if you could have a look at the 
implementation: https://github.com/srkunze/xheap . After all, it was 
your idea. I only perform the sweeping step during pop and remove with 
the condition of yours. :)

Using the original xheap benchmark 
<http://srkunze.blogspot.de/2016/02/the-xheap-benchmark.html>, I could 
see huge speedups: from 50x/25x down to 3x/2x compared to heapq. That's 
a massive improvement. I will publish an update soon.

Best,
Sven

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web