Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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