Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extremely high memory consumption #5156

Closed
inklesspen1rus opened this issue Feb 7, 2024 · 2 comments
Closed

Extremely high memory consumption #5156

inklesspen1rus opened this issue Feb 7, 2024 · 2 comments
Labels
C-bug Something isn't working

Comments

@inklesspen1rus
Copy link

Summary

Sample code just ate all my memory:

from timeit import timeit


def be():
    s = 0
    c = 0
    while c < 100000:
        c += 1
        s += c
    return s


print(timeit("be()", number=100, globals={'be': be}))

RustPython version: 0.3.0 (3eda1cf3)
Features: jit,flame-it,ssl,ssl-vendor

Expected

F:\UserDirs\Documents\keke>py keke.py
0.3749807000003784

Actual

изображение

F:\UserDirs\Documents\keke>rustpython keke.py
memory allocation of 55834574848 bytes failed

Python Documentation

@inklesspen1rus inklesspen1rus added the C-bug Something isn't working label Feb 7, 2024
@inklesspen1rus inklesspen1rus changed the title Extremely high memory consumption with timeit module Extremely high memory consumption Feb 7, 2024
@inklesspen1rus
Copy link
Author

That's not related to timeit module

Same problem with code below:

def timeit(func, number):
    from time import time

    start = time()
    for _ in range(number):
        func()
    end = time()
    return end - start


def be():
    s = 0
    c = 0
    while c < 100000:
        c += 1
        s += c
    return s

if __name__ == '__main__':
    print(timeit(be, number=100))

@inklesspen1rus
Copy link
Author

Duplicate of #2380 sorry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant