Announcement

Collapse
No announcement yet.

GNU Portability Library's Tool Rewritten In Python For 8~100x Better Performance

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • GNU Portability Library's Tool Rewritten In Python For 8~100x Better Performance

    Phoronix: GNU Portability Library's Tool Rewritten In Python For 8~100x Better Performance

    The GNU Portability Library for common portability code across platforms has seen a major rewrite to gnulib-tool, the program for importing modules from gnulib into their packages. This code rewrite of gnulib-tool is said to offer between eight and 100 times faster performance than the existing implementation...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Phoronix posters complaining about Python and performance are learning a lesson here: Performance is relative. In this case, Python heavily increased the performance. Surprise! Languages are just tools. It's ok to have preferences but they are not your religion. Same for desktop environments and such.

    Comment


    • #3
      gnulib-tool has been known for being slow for many years. We have listened to your complaints. A rewrite of gnulib-tool in another programming language (Python) is ready for beta-testing. It is between 8 times and 100 times faster than the original gnulib-tool
      One could easily argue that shell scripting is not a programming language.
      Spawning one or more processes on almost each statement is indeed a useless burden.

      Comment


      • #4
        Originally posted by spicfoo View Post
        Phoronix posters complaining about Python and performance are learning a lesson here: Performance is relative. In this case, Python heavily increased the performance. Surprise! Languages are just tools. It's ok to have preferences but they are not your religion. Same for desktop environments and such.
        the only lesson here is that Python is slow AF and shell scripts are even slower.
        that's the lesson.

        Comment


        • #5
          Originally posted by cynic View Post

          the only lesson here is that Python is slow AF and shell scripts are even slower.
          that's the lesson.
          And some people are just slow and paraphrase the same point I said already ie) performance is relative

          Comment


          • #6
            Now time for someone to rewrite it in Rust and claim another 50x performance boost

            Comment


            • #7
              It's not every day that somebody achieves a performance improvement of 8~100x. A cause for celebration, usually.

              On two occasions I improved some existing code on the job. Once by 12x, and once by 80x. Both were bottlenecks causing problems "in production". In neither case did I offend the original author. (That can be tricky.)

              Comment


              • #8
                Originally posted by spicfoo View Post

                And some people are just slow and paraphrase the same point I said already ie) performance is relative
                nope.
                you're saying performance is relative, I'm just saying Python is slow.
                we are not saying the same thing.

                Comment


                • #9
                  Originally posted by cynic View Post

                  nope.
                  you're saying performance is relative, I'm just saying Python is slow.
                  we are not saying the same thing.
                  It always depends on the use-case. Shell script's slowness is proportional to how many subprocesses it has to fork. Python's slowness is proportional to how far away from "glue together optimized C/C++/Rust libraries or wait on disk I/O or user input" your use-case strays.

                  Rust will be slow if you use it in a way it's not ideal for, such as implementing the kinds of graph algorithms that are inordinately suited to the way tracing garbage collection amortizes the cost of tracking whether memory is accessible compared to Rc/Arc (Rust's equivalent to C++'s std::shared_ptr), or if you neglect to wrap your I/O in either the provided BufReader/BufWriter or an alternative implementation enabled by them being optional.

                  Heck, NPM found that an experimental Rust rewrite of one of their services was slower than their Node.js solution until they tweaked things like buffer sizes where Node.js's defaults were more suited to the task. (In the end, they were about the same speed, but they kept the Rust version because it freed them from their ongoing game of "find and resolve the trickle of uncaught exceptions in the logs" whac-a-mole.)
                  Last edited by ssokolow; 21 April 2024, 10:58 AM.

                  Comment


                  • #10
                    Originally posted by cynic View Post

                    nope.
                    you're saying performance is relative, I'm just saying Python is slow.
                    we are not saying the same thing.
                    Thank you for proving my point. You said this:

                    Originally posted by cynic View Post
                    the only lesson here is that Python is slow AF and shell scripts are even slower.
                    You readily admitted compared to shell scripts, Python is faster ie) performance is relative.

                    Comment

                    Working...
                    X