Hacker News new | past | comments | ask | show | jobs | submit login

Hope that the cloud providers don't bill according to energy consumption. I like Python a lot...



They already do, in the sense that you'll need beefier/more machines to do the same job.

Of course, using Python means you have a lot of low-hanging fruit to pick. We have a Python service where we moved ONE ~60 line recursive function to Go and overall CPU consumption dropped to 15-20% of what it used to be.


That sounds pretty damn nice - would you happen to have a good link in mind for reading more on the subject?


This was a financial function which calculated an internal return of return for a long series of uneven cash flows, essentially a python implementation of the XIRR function that spreadsheets have.

To get to the required two decimal places of precision, each call would recurse 50-60 or more times so this was more or less all that the server was doing.

A VERY low hanging fruit.


What's interesting is also how go and python interaction is since you seem to be able to call go from python and the reverse very efficiently.


Sorry but we actually cheated on that part. Redid the page so that the function that is now in Go is a separate little service that is called via ajax directly by the users' browsers.

So there's no actual Python-Go interaction in our code.

This was quicker, cleaner and has made the page more responsive for users.


Thanks this comment is useful, client side integration is integration after all, and I think if it was simple, you would have it done differently (if I understand your words correctly - "cheating").




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: