3 ms·
> >I couldn't fit the data set in memory with PHP. But I could do it with Go. when would you ever have a website serve a request, and have to use gigabytes of
by heywhatupboys 3y ago
> >I couldn't fit the data set in memory with PHP. But I could do it with Go.
when would you ever have a website serve a request, and have to use gigabytes of memory to do so?
> Consider the following (covers both statements above): you need to get some data from a few sources (databases etc) do some computation on each set and then do some sort of mapping to get the resulting set. You may want those computations to run in parallel and idealy you'd like to start mapping as soon as each computation function starts producing results.
Again, why would you ever have an HTTP server do so much work in order to serve a request?
- konart 3y ago>when would you ever have a website serve a request, and have to use gigabytes of memory to do so? I'm pretty sure that PHP is not only used for web sites otherwise comparing to Go is simply meaningless. There is little to no point in using Go to build something with a relatevely low load. >Again, why would you ever have an HTTP server do so much work in order to serve a request? http server != website. You can have two services somewhere down infrastructer that communicate via http(s).
- heywhatupboys 3y ago> I'm pretty sure that PHP is not only used for web sites PHP is explicitly designed to serve web content. It's usage may vary, but it is unfair to expect it to optimize towards anything but as a web backend.