Hacker News new | ask | show | jobs
by davidjohnstone 5068 days ago
The server side code of http://www.cyclinganalytics.com/ is almost entirely Python with a small amount of C.

There's one particular bit of data processing that gets a couple of orders of magnitude speedup by writing the code in C rather than Python. It involves lots of loops and indexes, and it's possible there's a faster way to do it in Python, but I couldn't think of one.

2 comments

I've been considering getting a bike for some time now. It should be in the budget soon, so I'll bookmark your app and use it some time. Thanks!
Thanks. You might want to check out Strava too.

My site is focused on the niche of "serious" cyclists who use power meters. The three main ones are PowerTap, Quarq and SRM, none of which are cheap (you can get a PowerTap wheel for about $1k, and that's the cheapest). They're widely used by competitive cyclists, and as somebody who loves numbers, I highly recommend them (power data is the most revealing data that can be collected on a bike), but the vast majority of bikes don't have them (yet).

I'm not trying to dissuade you from using my site, but you might be more satisfied with Strava. That said, it's possible to use both — rides uploaded to my site can be automatically uploaded to Strava.

(I'm going to remake the front page to make it more informative soon.)

I'm not sure that you would be able to get it as fast in Python but if you have not checked out the bisect module, I highly recommend it.