• ChubakPDP11+TakeWithGrainOfSalt@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    Well why would a language that is compiled with state-of-art intermediate language like LLVM, with optimization flags, perform better than interpreted languages that, at best, JIT’d.

    Also, Rust is perhaps, the shittiest, slowest compiled language out there. Even TCC has a leg up on it. If you want LLVM use Clang. If you want to do netprog use Go, it takes a bit of tinkering to make it as fast as say, GCC, but it’s worth it given how the STD make networking easy.

    All an all, Rust is babby’s first compiled language, it mixes in elements of functional languages and makes unlearned people go waaah. Pathetic. If you really like how Rust handles its syntax, use a real functional language like OCaml. It has both a compiled, and an interpreted backend. In fact, SML compilers like MLton are sometimes faster than Rust.

    I really don’t know why Rust has the reputation it has, and I don’t know why people complain that ‘AI is terrking our jerrbs’ when they fail to comprehend basic shit like this.

    Like I know people who fail to understand the difference between semantics of a language and they complain that AI is taking their job. Damn.

    • porgamrer@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      What a whirlwind!

      Also, Rust is perhaps, the shittiest, slowest compiled language out there. Even TCC has a leg up on it.

      TCC is written exclusively to compile quickly, not to do any real optimisation. There is no conceivable situation in which TCC output will outperform equivalent Rust code.

      If you really like how Rust handles its syntax, use a real functional language like OCaml

      Rust takes inspiration from OCaml in almost every area except syntax. Close to zero syntax similarly.

      In fact, SML compilers like MLton are sometimes faster than Rust.

      Lmao, this is a classic line from ~2009 message boards, but with “C++” swapped out for Rust.

      Almost every single thing you said is wrong, but in a way too precise to be attributed to random noise. Like scoring zero in a multiple choice exam. I don’t know if you are some kind of performance art troll, but please continue. I’m an instant fan of your work.

    • snaggen@programming.devOP
      link
      fedilink
      arrow-up
      0
      ·
      edit-2
      3 months ago

      You don’t have to understand everything, it is ok. And joining a language community for a language you hate just to rant about it, shows that you should try to focus on letting things go. It feels a bit obsessive.

      If you actually like to have a conversation about the language, I suggest you be a bit more specific and we will try to answer to the best of our ability.

      Have a nice day, and don’t forget to breathe.

      • What do you mean ‘joining the community for a language you hate’? I am on a Western fora and I despise West. Sometimes you just have to touch the shit, be it Rust, or the West, to get your message across. I don’t feel like insulting West rn because you guys are emotional and start crying if I prove to you how hallow your culture is, so I digress. (these ‘may’ be sarcasm, I leave it up to you to decide if I am being sarcastic or not. protip: I am/not?).

        Also, you don’t have to know ‘everything’ but you have to know basic shit right? And this is one of those ‘basic shit’ that one must know tbqh.

        Btw I don’t hate Rust. I like it. There’s a reason languages like D failed, and Rust succeeded. D is much better-specified than Rust is. D has a whole heap of specs. There are 3 D compilers to Rust’s 1 (GCC-Rust will never materialize, mark my word. My GCC frontend for SML will come out sooner than GCC-Rust, mark my words, again). However, D neither has the memory allocation primitives that Rust has, nor does it have the meta-programming capabilities that Rust has.

        I enjoy how Rust mangles up functional programming into imperative paradigm. I also enjoy that it’s allows you to choose your LLVM-compliant toolchain.

        But at one point, we have to admit that Rust is ‘bespoke’. Rust is not an standard, Rust is not a compiler. Rust is closer to a ‘program’. Like, imagine this, there’s a reason GCC-Rust is stalled, that’s because Rust sucks at being re-implementable and a language that is not implementable is not language at all. It’s just a program!

        I was rather annoyed when I made my post, and I take it back — Rust is a good ‘program’, just nor a language (just like Westerners are not ‘men’, just ‘humans’ — who have been plundering the world for the past 600 years and they think they’re oh so cool, whereas I, singlehandedly am cooler than all West combined — I may, or may not be sarcastic with this remark, or am I?).

        Whatever mang. Code your shit. It does not matter. There’s lots of cool shit made with Rust. Like a whole new POSIX is being made with Rust (fd, ripgrep, fish, exa, batcat etc). Languages are just tools, they are not the identity of your program. It just happens that I like my workflow of C + OCaml + Haskell for programming, and Perl + Ruby for scripting. Each to his own I guess. Hell, I may, I just may forgive you for being a Westerner (protip: I won’t).

        I’m just surprised that people still don’t understand why Rust is ‘fast’ compared to interpreted/JIT’d languages that they use. It’s just pathetic. Some people make crappy, shitty blog posts and I don’t understand what purpose these blog posts serve? I mean, like the one in OP. That’s what annoys me. I really wanna have a blog where I talk about stuff I know, the quality of the stuff I know nonwithstanding, but these goddamn blog spammers make me ashamed of ever owning a blog.

        Ok enough diatribes. I don’t hate west btw, OR DO I?

  • bonus_crab@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    so to briefly answer the question in the title after reading the article : i dunno maybe prepared statements

  • Baldur Nil@programming.dev
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    Benchmarks should be like a scientific paper: they should describe all the choices made and why for the configurations. At least that will show if the people doing it really understand what they’re comparing.

    • FizzyOrange@programming.dev
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      Yeah I have to second UnfortunateShort. Benchmarking papers are on average very bad, often because they’re trying to push a particular idea or product and are very biased, or because they’re like “my first benchmark” and done by people who don’t know what they’re doing.

      A classic one that gets referenced a lot is “Energy Efficiency Across Programming Languages” I which the authors seriously benchmarked programs from the very heavily gamed Computer Language Benchmarks Game, and concluded among other things that JavaScript is much more energy efficient than Typescript.

      The only realistic way to benchmark different languages is to take implementations that weren’t written to be fast in a benchmark. For example Rosetta Code, or maybe leetcode.com solutions.

      Or to do it yourself. But that requires you to be experienced in many languages.

      Difficult for obvious reasons.

    • UnfortunateShort@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      Have you ever read a paper? You can consider yourself lucky if they have error bars and repeated their measurements more than once. The quality of “benchmarking papers” is comically bad (on average).

  • Kissaki@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    3 months ago

    I would have expected that at least all the frameworks were using the same database, but no. Some frameworks use MySQL, others use PostgreSQL. Some framework implementations are ultra-optimized and others are what you would expect in your average web application. Some frameworks are using proper templating libraries, others are using Sprintf.