News for hackers. Stuff that matters.
Re:Go performance from version 1.2 to 1.18 by adgjlsfhk1 on Thursday February 03, 2022 @11:17PM (#30202802)
To be fair to non-Javas, the java version is using Java code because Java sucks at calling out to faster languages.
Re:Go performance from version 1.2 to 1.18 by zmmmmm on Friday February 04, 2022 @12:28AM (#30203236)
Oh yes, that Python code looks so idiomatic:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

Re:Go performance from version 1.2 to 1.18 by pmontra on Friday February 04, 2022 @12:48AM (#30203332)
Can't comment on that but why are these people putting spaces after commas (correct) and not to the left and right of the assignment sign = ? It's so weird to read a=b
Re:Go performance from version 1.2 to 1.18 by viraptor on Friday February 04, 2022 @12:39AM (#30203289)

    regex=PCRE2.pcre2_compile_8(pattern, c_size_t(len(pattern)), c_uint32(0),
   byref(c_int()), byref(c_size_t()), None)
As far as FFI goes, I would say this looks amazingly simple.
Re:Go performance from version 1.2 to 1.18 by oefrha on Friday February 04, 2022 @03:26AM (#30204223)
That’s very straightforward translation of C code using pcre to Python using ctypes. It doesn’t look great because the ugliness isn’t wrapped in a library. But Python ctypes definitely isn’t hard to use. It is unsafe as hell though.
Re:Go performance from version 1.2 to 1.18 by igouy on Friday February 04, 2022 @01:17PM (#30210735)
Re:Go performance from version 1.2 to 1.18 by igouy on Friday February 04, 2022 @01:56PM (#30211286)
Seems to be OK in pidigits — Java #3 program

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

    C gcc #6 0.56s
    Java  #3 0.79s
Re:Go performance from version 1.2 to 1.18 by azth on Thursday February 03, 2022 @11:55PM (#30203034)
There's JNI that exists now. And Project Panama will be a big improvement.