Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

General Discussion

Ante Vujčić
Ante Vujčić
11,306 Points

Best language for lots of calculations but still fast website loading?

I have a question that has been bothering me for a while. I would like to know what would be the best language to write maybe few hundred lines of code with some calculations and lot of loops and so on. For example: Website that takes informations from other sites using API and then use them to do a lot of calculations and than displaying result on its own site. I am aware that I should use maybe more languages to do so but what language should i be using for doing those calculations and still have fast website because if im not mistaken JavaScript is open to client to see file (I don't find that usefull) and it's probably going to slow down loading of site because site needs to download that JavaScript, there is also PHP but some say that it can slow server down if there is a lot of traffic because server will be in need to do calculations for every client. Now is there some language that is let's say running on server every 5 mins (I know that this delay should be written in code as well) and sends results to site when client request so (this should remain server and loading page fast because site needs to download less files and server is not doing hundreds calculations for every user). Thanks

2 Answers

Casey Ydenberg
Casey Ydenberg
15,622 Points

C and Java are faster languages than PHP, Python or Ruby - but there is a much steeper learning curve. It's all about tradeoffs.

Felix Yakubov
Felix Yakubov
17,475 Points

I am not a pro but I think Node + Angular is the best for what you described