• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

eriknw / toolz / 86 / 1
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: python3.6
DEFAULT BRANCH: master
Ran 10 May 2014 01:10PM UTC
Files 11
Run time 3s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 May 2014 01:07PM UTC coverage: 100.0%. First build
PEP8_IGNORE=""

push

travis-ci

eriknw
Faster unique, isdistinct, merge_sorted, and sliding_window.

The `key` keyword argument to `unique` was changed from `identity` to `None`.
This better matches API elsewhere, and lets us remove `identity` from being
redefined in `itertoolz`, which always seemed a little weird.

Most of the speed improvements come from avoiding attribute resolution in
frequently run code.  Attribute resolution (i.e., the "dot" operator) is
probably more costly than one would expect.  Fortunately, there weren't
many places to apply this optimization, so impact on code readability was
minimal.

`unique` employs another optimization: branching by `key is None` outside the
loop (thus requiring two loops).  While this violates the DRY principle (and,
hence, I would prefer not to do it in general), this is only a few lines of
code that remain side-by-side, and the performance increase is worth it.

`merge_sorted` is now optimized when only a single iterable remains.  This
makes it *so* much faster while in this condition.

467 of 467 relevant lines covered (100.0%)

1.0 hits per line

Source Files on job 86.1 (PEP8_IGNORE="")
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 86
  • Travis Job 86.1
  • 72aeb800 on github
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc