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

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

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

pending completion
#574

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

Jobs
ID Job ID Ran Files Coverage
1 #574.1 23 Jun 2020 01:32PM UTC 0
98.58
Source Files on build #574
Detailed source file information is not available for this build.
  • Back to Repo
  • 01046855 on github
  • Prev Build on master
  • Next Build on master
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