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

basilisp-lang / basilisp / #574 / 1
99%
main: 99%

Build:
Build:
LAST BUILD BRANCH: feature/python-inspect-ns
DEFAULT BRANCH: main
Ran 23 Jun 2020 01:32PM UTC
Files 37
Run time 7s
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

23 Jun 2020 01:23PM UTC coverage: 98.582% (+0.001%) from 98.581%
#574.1

push

coveralls-python

web-flow
Improve the lookup speed for Keywords by pre-computing hash (#592)

This PR includes a change to pre-compute the hash of a Keyword a new instance is created. Keyword hashes are used as the lookup key for Keywords inside the intern cache. Keywords are also commonly used as map keys and in other collections requiring hashability, so having a pre-computed hash should help improve performance by not requiring repeated computations of the otherwise static hash.

The compiler now also uses the pre-computed Keyword hash to lookup Keywords directly from the intern cache, which should reduce the cost of repeated lookups (particularly if a function makes heavy use of keywords).

This change appears to have improved the lookup speed by around 9%.

Before these changes:

```
basilisp.user=> (import timeit)
<module 'timeit' from '/Users/christopher/.pyenv/versions/3.6.9/lib/python3.6/timeit.py'>

basilisp.user=> (timeit/timeit (fn [] :abc))
0.7336159450060222
```

Afterwards:

```
basilisp.user=> (import timeit)
<module 'timeit' from '/Users/christopher/.pyenv/versions/3.6.9/lib/python3.6/timeit.py'>

basilisp.user=> (timeit/timeit (fn [] :abc))
0.668459995999001
```

2498 of 2553 branches covered (97.85%)

Branch coverage included in aggregate %.

6954 of 7035 relevant lines covered (98.85%)

0.99 hits per line

Source Files on job #574.1
  • Tree
  • List 0
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 574
  • 01046855 on github
  • Prev Job for on master (##571.1)
  • Next Job for on master (##577.1)
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