7 ms·
Yeah: your real bottlenecks are going to be 1) getting data out of your database and 2) sending packets across the internet. These are 100 times and 1000 times
by jes5199 14y ago
Yeah: your real bottlenecks are going to be 1) getting data out of your database and 2) sending packets across the internet. These are 100 times and 1000 times slower than your program, the 10x penalty to use ruby/python instead of C/C++/go/rust isn't going to matter.
- theoj 14y agoYou conveniently forgot a key bottleneck: the amount of RAM on your server. That's what determines how many concurrent sessions you can keep running before performance degrades and you need to add another server.
- jes5199 14y agoYeah, but as a programmer that's not really my domain, and anyway throwing more servers at the problem fixes it, and doesn't require much change in the architecture of most apps. The maximum speed of the internet, the maximum speed of your database, the maximum speed of your programming language are all basically constants that you can't improve by throwing money at the problem.
- eksith 14y agoThat is just plain appalling. As a programmer, available memory is absolutely your domain or else you're increasing hardware/VM costs for yourself or your employer needlessly. Then you've transferred the cost of increased hardware to host your app/site/whatever off to users. I can see today bit pinching isn't fashionable as it was long ago when memory wasn't cheap (it's not really "cheap" today either since you're paying proportionally greater per VM than the actual cost), but when a basic tenet like efficiency is ignored because DB all you're doing is compounding the problem. BTW. Most people already deal with the DB issues with aggressive caching and/or reverse proxy so that still leaves the core application.
- fleitz 14y agoMost garbage collected languages can't handle all the memory available on modern systems. Hardware costs pale in comparison to revenue and the cost of programmers. (Unless your service is free) In general if your server is making you money, you'll make more money improving the service than reducing the amount of RAM the service takes to run. In summary, test the conversion rate of a page/feature/etc, not how much RAM it uses. If you're going to performance optimize, attach a profiler and take the easy wins, don't spend too much time on it unless it's a ridiculous amount of resources or your margins on razor thin.
- fauigerzigerk 14y ago"Hardware costs pale in comparison to revenue and the cost of programmers." That's not a law of physics. The number of servers you need depends on the number of users you have. The functionality you have to build usually doesn't. So the more users you have, the less true your statement becomes.
- gngeal 14y ago"Most garbage collected languages can't handle all the memory available on modern systems." I don't think that has anything to do with the languages. I think that has everything to do with the quality of the memory manager implementation, and there is at least one memory manager that does deliver in this respect, namely C4.
- relix 14y agoAt an hourly rate of $120, thinking 10 minutes about saving RAM costs my client $20. With that money he could've bought 1GB extra RAM. I'm sure 99.999% of the times the saved RAM, would be less than 1GB. It's a simple cost/benefit equation. If you can save more than 1GB by thinking 10 minutes about it, you're writing shitty code to begin with. There are times when the benefits are greater, for example when your software is running a million instances, or you're working on a hardware-intensive game, but those are certainly not common case.
- deleted 14y ago
- NateDad 14y agoThis is terrible. It's your job to know how much memory you're using and not to use too much if you can help it. In many environments it's set at a very low value - desktop, mobile, client-side web apps, embedded. Even in an environment where RAM is cheap and you can scale it as you want... using too much RAM can cause paging issues, cache-miss issues, increase your server startup time, etc. All of these are real world issues that you, as a developer, are responsible for.
- DigitalJack 14y ago"Conveniently forgot" is a very rude thing to say. Even if you think someone left something out on purpose, your argumentation won't benefit from the usage if that phrase.
- theoj 14y agoSorry if it came out that way... that was not my intention. I just wanted to highlight a fairly large omission.
- klibertp 14y ago"the amount of RAM [...] determines how many concurrent sessions you can keep" I don't understand. Concurrent sessions? Do you mean open connections? Worker threads? What exactly?
- vidarh 14y agoI haven't run into a situation where RAM was a limit I cared much about for many years. If you rely on hamstrung VPS's, perhaps, but RAM is cheap. The servers we buy at work rarely have less than 32GB these days, and most can take 384GB or more. A couple can take up to 768GB. If anything, I work hard to put more stuff in RAM to avoid hitting disk, as even though we have SSD's in all our new servers, disk IO is still inevitably where we hit limits first, followed by CPU. Running out of memory is a rare event, and when it is it is consistently an indication of a bug.
- anoncow 14y agoIs Go fast AND human friendly?
- jes5199 14y agoSome people certainly think so. "Fast" and "Friendly" are both relative concepts, and it's hard to get a definitive answer.
- anoncow 14y agoIs Go as fast as java and as friendly as python?
- afandian 14y agoYes.
- nemothekid 14y agoMy experience with Go is that it is as friendly as python. Not a lot of tricks and was incredibly easy to pick up and understand. But FWIW, I don't think its as fast/mature as Java yet.
- ralfn 14y agoNeither. Less friendly ("language complexity") than Python, and less performant than Java (not in the same league). Its just another trade off. Beyond the hype, it has interesting choices, and some very poor ones. (No algebraic datatypes, conservative exploitable will-break-your-program garbage collector, no tail recursion) But the trade off between performance, safety and compile time is quite unique, and should be considered its main contribution to the language design space. Its just too bad it ignores every other contribution from the last thirty years. Like how to do a type system, or how to write a garbage collection that survives long run proccesses.
- pointyhatuk 14y agoBoth of those are subjective.
- ansgri 14y agoWell, you're talking about making easy things even easier (CRUD web apps connected to DBs; the inherent complexity is low). That's very important for horizontal technology expansion, i.e. 'easy IT everywhere'. For vertical progress, i.e. making complex things possible, these micro-bottlenecks are important. These same DBs with their query processing and other domains with extremely high inherent complexity would greatly benefit from high-level languages yet still the most difficult parts have to be written in the already difficult C(++).
- coldtea 14y ago>Yeah: your real bottlenecks are going to be 1) getting data out of your database and 2) sending packets across the internet. These are 100 times and 1000 times slower than your program, the 10x penalty to use ruby/python instead of C/C++/go/rust isn't going to matter. Only if you're talking about the typical CRUD, website, etc program. Why should we? People use Python for numerical analysis, scientific computing, etc. Why not let them be able to do that, while still writing in Python (instead of using libraries that delegate to C/Fortran/etc)? And even a website can do intensive computation work. Why HAVE to write it in 2 languages?
- anonymous 14y agoThe people who use python for numerical analysis use solutions like numpy, with which their programs spend most of their time executing optimised numeric routines.
- yummyfajitas 14y agoIf you can structure your program in such a way that all your inner loops are handled by BLAS/LAPACK/FFTW, then python works great. The sad fact is you can't always do this. Then you are forced to drop down to C/C++/Fortran. It would be great if you didn't always have to do this.
- pjmlp 14y agoThe scientific community seems to be welcoming Julia open arms, given its performance improvements over Python, if you look at the rate code is being ported to such a young language.
- travisoliphant 14y agoThis is exactly what Numba is designed to help with. And it already works extremely well for such cases. Numba lets you have ease of use (un-typed containers) and speed (with typed-containers) in the same run-time and the same syntax. Here is are some IPython notebooks which illustrate: https://www.wakari.io/nb/travis/Using_Numba https://www.wakari.io/nb/travis/Using_Numba https://www.wakari.io/nb/travis/numba https://www.wakari.io/nb/travis/numba And the slides from PyCon Talk: https://speakerdeck.com/pyconslides/numba-a-dynamic-python-compiler-for-science-by-travis-e-oliphant-jon-riehl-mark-florisson-and-siu-kwan-lam https://speakerdeck.com/pyconslides/numba-a-dynamic-python-c...