question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nuitka is slower than standard python2.7

See original GitHub issue

i tested the following demo code and found nuitka is slower than python2.7

import time

t = [ i for i in range(1,10000000)]
s = [ i for i in range(1,50000)]

t1 = time.time()

def test002():
    print(set(s).issubset(t))


def test001():
    sd = True
    for i in s:
        if i not in t:
            sd = False
    print(sd)

test001()
test002()

t2 = time.time() off = t2-t1 print(“used time = %f seconds.” % off)

result of python: build_python python hello.py True True used time = 12.913735 seconds.

result of nuitka: build_python ./hello.bin True True used time = 18.586609 seconds.

i saw the offical website said “nuitka is about 3 times than standard python,” but why is that testing result?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
kayhayencommented, Dec 11, 2019

Unfortunately, for the benefits of this to kick in all cases, some stars will have to align for me to finish this, without hurting scalability.

0reactions
sunbitcommented, Mar 5, 2020

Hello

I think this is happening in one of our legacy code that we have in 2.7 right now. Unfortunately i cannot provide a detailed info about the code right now, what i can say is that is a Flask application running on uwsgi, compiled with 0.6.7, and our tests shows that the nuitka compiled version doubles the execution time on average compared with running Cpython.

Is there any progress on this?

Thank you for your work!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Nuitka-chat/community - Gitter
So far it was found to be only slower than pure MinGW64. ... but that is not the point for Python2.7 builtin_sum is...
Read more >
Intro to Nuitka: A better way to compile and distribute Python
You can use Nuitka to compile Python programs to standalone executables, then redistribute them without the Python runtime.
Read more >
Nuitka - Gitee
Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.3, 3.4, 3.5, 3.6, and 3.7. You feed...
Read more >
Make your Python Apps Run Faster - Fun Tech Projects
Nuitka – a native Python utility to compile Python apps to C code ! ... Pypy has a Python 2.7 and 3.6 version...
Read more >
How come there is so little talk about Nuitka? : r/Python - Reddit
I informally benchmarked some programs with Nuitka 0.4.2, and it seems to be slower than CPython by about 20 or 30% on average...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found