• laserm@lemmy.world
      link
      fedilink
      arrow-up
      4
      ·
      5 hours ago

      I once write a web app in C, but this terrifies even me… though Tsoding, the guy in the video, did that, too…

      • harbard@fedia.io
        link
        fedilink
        arrow-up
        2
        ·
        3 hours ago

        My favorite so far is either my websever in bash or my webserver in Common Lisp. my webserver in C was fun too though

      • frezik@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        7
        ·
        5 hours ago

        Meh. Even hosting static files in a RAM disk over localhost, you’re 99% as good as you can be by using the sendfile() system call. The kernel can copy data from one file descriptor to another faster than any userspace program can. Implementing the Length header is a stat() call.

        If you’re not on a RAM disk and not on localhost, then disk access or network throughput will predominate.

        Assembly is not magic go faster sauce.

      • Ad4mWayn3@sh.itjust.works
        link
        fedilink
        arrow-up
        9
        ·
        6 hours ago

        I mean, just because you implemented something in a low level lang, it doesn’t mean you’re gonna have the fastest implementation. Even in high level langs, there’s usually heavy optimization involved in things that are done all the time (e.g. web servers)

      • anton@lemmy.blahaj.zone
        link
        fedilink
        arrow-up
        1
        ·
        4 hours ago

        Who do you think is better at writing assembly? @harbard@fedia.io or a modern compiler with hundreds of contributors.