News for hackers. Stuff that matters.
Re:The Ethics of Web Performance by sieabahlpark on Thursday August 01, 2019 @02:25AM (#20581419)
When you can be just as productive as a web developer in c++ let me know.
Re:The Ethics of Web Performance by guessmyname on Thursday August 01, 2019 @02:36AM (#20581488)
> When you can be just as productive as a web developer in c++ let me know.

I used to work at OkCupid. The entire web application is written in C++ [1] and I was quite proficient with the language even before joining the company. Then I joined a medium sized game studio where C++ was also the most common language, and as you can guess we also decided to built the game landing pages and user management system using C++ with Boost and an in-house template system.

I am not OP but you asked to let you know if someone is a productive web developer in C++, well, I am.

[1] https://github.com/OkCupid/okws

Re:The Ethics of Web Performance by okaleniuk on Thursday August 01, 2019 @02:40AM (#20581506)
Let's skip this and go right to web development in assembly:

https://board.asm32.info/

The author claims that it's only twice less productive to write in assembly than in high-level languages. But the performance gains are overwhelming so it might very well pay back the effort.

Re:The Ethics of Web Performance by mr__y on Thursday August 01, 2019 @03:25AM (#20581738)
Assembly? Thats for amateurs, we should move right to FPGAs
Re:The Ethics of Web Performance by vardump on Thursday August 01, 2019 @03:55AM (#20581903)
To cut this short (own silicon, sand, etc.), we should just create a universe first.

FPGAs are fun, though. Saving 12 microseconds (assuming gigabit and "standard" frame sizes) of latency by sending ethernet frames (that contains frame data CRC!) before you even have all of the data to send and then modifying data at the end of frame to match with whatever CRC we sent ~12000 bit times (= 12 microseconds) before.

Re:The Ethics of Web Performance by mr__y on Thursday August 01, 2019 @09:31AM (#20583515)
That seems extremely interesting to me! Would you care to tell any details about that or is it covered by NDA? I'm guessing that's something HFT related?
Re:The Ethics of Web Performance by vardump on Thursday August 01, 2019 @10:58AM (#20584280)
This was just for fun (tm).

I know HFT guys pull of tricks like these, but no, this is either not difficult to pull off on an FPGA nor is there any NDA. Easy if you send UDP with checksums off or raw ethernet frames. Receiving party will of course need to ignore the last 4 bytes needed to make the CRC computation correct.

Would be interesting if anyone managed to do this with TCP. If it's even possible to get both TCP and ethernet frame FEC match in real time and ideally somehow even mask the data from the recipient. Probably not possible, but... who knows.

Re:The Ethics of Web Performance by luckylion on Thursday August 01, 2019 @02:33AM (#20581465)
Fair point. I believe productivity is a major factor in most performance issues. Write highly optimized code that's very fast and as small as possible or pull in jquery and a dozen libraries? It's pretty obvious which one will get the job done more quickly.

And once the job is done, optimization often is off the table, because the next features await. I work for clients that are making lots of money with their sites, and not even then are they willing to spend pennies on the dollar to optimize those pages.

Maybe the highest impact you can get is working on most-used parts. Make Wordpress run 3% more efficiently and you'll have an enormous global impact. Make your own site run 3% more efficiently and it won't register globally, unless you're Google, FB etc.

Re:The Ethics of Web Performance by de_watcher on Thursday August 01, 2019 @02:35AM (#20581479)
It's just good developers are hard to find.

Web gurus will tell you that web is slow because the specific sites are written badly.

While Linus has told that C keeps bad developers away from the kernel.

Re:The Ethics of Web Performance by pjmlp on Thursday August 01, 2019 @02:48AM (#20581529)
It is a matter of tooling.

Using something like C++ Builder with its Internet VCL component libraries it is hardly any different from using Java or .NET stacks for Web development.

Re:The Ethics of Web Performance by pacaro on Thursday August 01, 2019 @02:29AM (#20581447)
Indeed, there are many factors to consider here. In a sense that is what makes discussions like this interesting!

I suspect that in some respects that we already optimize for this as an industry, we might have application logic in python, but the database is presumably written in a systems programming language.

Re:The Ethics of Web Performance by pjc50 on Thursday August 01, 2019 @05:37AM (#20582381)
I've been a professional C++ developer for years and I absolutely would not do this. The security risks are just too high, not to mention the build times.

I'd probably default to C#, which can be decently fast and has a managed runtime.