2 ms·
On a related note, it also makes me wonder how blazingly fast computers would be if we implemented today's applications in raw, gory C/C++ code, like it used to
by dheera 11y ago
On a related note, it also makes me wonder how blazingly fast computers would be if we implemented today's applications in raw, gory C/C++ code, like it used to be, instead of JavaScript and Java. Besides sharing, Google Drive Spreadsheets has about the same feature set as Microsoft Excel 2.0, but it consumes at least a hundred times more resources in terms of CPU cycles and RAM. Every single line on the spreadsheet grid, every button, behind the scenes, is a massive CSS and JS undertaking.
I distinctly remember when MATLAB went from version 6 to version 7, the entire UI suddenly became slower by at least a factor of 10, because they redid the entire UI in Java. With the Java version, there was even a perceivable lag between pressing my mouse button down on a UI button, and the respective button shading appearing on the button.
Most of my Android apps typically take 1-2 seconds to load, again, courtesy of Java. I imagine the equivalent-feature-set apps of 10 years ago, if they were adapted and cross-compiled from their C code, would probably load in <0.1 s, faster than human perception.
Firefox's user interface uses XML to define its layout. For heaven's sake, something that doesn't ever really change requires loading a bloated XML parser each time?
We've come a long way in terms of connectivity and security, but I feel like as Moore's Law has given us exponentially more powerful CPUs, we've also written built exponentially more bloat into our apps, so nothing has actually gotten that much faster.
I'm not disputing the merits of modern computing, but sometimes I just wonder what it would be like if we had a system today whose UI response is consistently faster than human perception.
- mtdewcmu 11y agoI think most applications could be sped up significantly by rewriting them more efficiently in their own language. You're rarely maxing out the possibilities of the language you're using, because it requires time, skill and a different philosophy of development than you typically find in corporate software. >> Most of my Android apps typically take 1-2 seconds to load, again, courtesy of Java. Java is kind of a special case, because the time spent re-compiling the code every time is pure waste. Java code can be rewritten almost 1:1 in C++ and derive a performance benefit, at least for things like initial startup. iOS prefers ObjectiveC, so you could get some sense of the potential benefits of native code by playing with iOS apps. It's probably not as big as you might think, because there are a lot of other bottlenecks that have nothing to do with language. Firefox's use of XML for layout shouldn't make much difference, because XML parsing isn't really that slow and there are much bigger bottlenecks involved in rendering a GUI.