Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Борис Верховский
    @verhovsky
    You could try figuring out which modules are causing the segfault using the print statement I mentioned earlier and adding them here https://github.com/RustPython/RustPython/blob/6064f7eb2e3350c23413c270b17421d9c5e6967a/extra_tests/not_impl_gen.py#L159
    Mireille Raad
    @mireille-raad
    in what's left, I now get things like math.acos ValueError('no signature found') != (x, /)
    math.acosh ValueError('no signature found') != (x, /)
    math.asin ValueError('no signature found') != (x, /)
    math.asinh ValueError('no signature found') != (x, /)
    math.atan ValueError('no signature found') != (x, /)
    math.atan2 ValueError('no signature found') != (y, x, /)
    math.atanh ValueError('no signature found') != (x, /)
    math.ceil ValueError('no signature found') != (x, /)
    math.copysign ValueError('no signature found') != (x, y, /)
    math.cos ValueError('no signature found') != (x, /)
    is that expected ?
    Darley Barreto
    @darleybarreto
    @carbotaniuman I've found you fork of gcmodule. Is this very similar to CPython's? What do you think of PyPy's incminimark? Or Inko's rust version of the parallel Immix gc?
    1 reply
    Борис Верховский
    @verhovsky
    @mireille-raad yes RustPython/RustPython#2411
    maybe we need a flag to disable it though
    Mireille Raad
    @mireille-raad
    @verhovsky yeah, it will be neat to have an option to disable .... or do the opposite, hide by default and have a "verbose" option to show the details because some sections have longer (multiple lines) errors... so it becomes harder to scroll and read.
    Борис Верховский
    @verhovsky
    that makes sense, I'll rewrite whats_left to be a CPython script that uses argparse, generates not_impl.py and calls RustPython using subprocess
    Mireille Raad
    @mireille-raad
    If it is a lot of work, it may not be worth it. Your call.
    Борис Верховский
    @verhovsky
    @mireille-raad
    I will make it nicer to read, but you can use it now if you'd like
    the function signature stuff is hidden by default and you can also do python3 whats_left.py --json | tail -n 1 | jq .
    signature differences aren't hidden if you're using JSON output though
    carbotaniuman
    @carbotaniuman
    Any reason RustPython/RustPython#2382 isnt being merged? Planning to trial out some GC stuff built on that so wondering if theres an objection to the change itself
    Noa
    @coolreader18
    @carbotaniuman I've been hesitant, I guess, to merge it, since a function call on every decref probably isn't great for performance. But, I haven't done any actual benchmarking and it's probably fine to do it just in the interim while we find a better solution (I'm leaning towards just copying over Arc/Rc implementation)
    pca006132
    @pca006132
    hi, I tried the fibonacci program in issue RustPython/RustPython#2445 , it seems that the atomics required by the "threading" feature is really killing the performance
    what is the use of the threading feature? and do we really need those atomic for threading feature? atomics would really hurt performance...
    For example, after adding fast path for int binops and optimizing the check signal function to avoid atomic swap, fib(33) on my computer took 10.627s when "threading" feature is on, and 6.29s when "threading" feature is off, and avoiding "threading" could allow other optimizations such as using RefCell for lasti instead of atomic integers.
    pca006132
    @pca006132
    and it seems not very efficient to load and store from the ctx for integers... I wonder if it would be possible to use fat pointer for PyObjectRef, so int32 can be stored in the ref directly without accessing ctx... but this may require large refactoring and idk how much performance improvement it can give
    Athul Muralidhar
    @AthulMuralidhar
    guys look at this - https://cryptography.io/en/latest/installation.html#rust - we might become eventually the main compiler for python! super excited
    Noa
    @coolreader18
    That's a pretty cool use of rust, but I think they use pyo3 for that, not RustPython -- they define a CPython extension module in Rust
    Athul Muralidhar
    @AthulMuralidhar
    yep, thanks for the clarification :)
    Zomatree
    @Zomatree
    i presume its not normal for rustpython to take 1h+ to import a couple modules, take up like 10GB of memory and max out a cpu core.
    Noa
    @coolreader18
    ooh, yeah, are you building in release mode?
    cargo build --release?
    or cargo run --release
    Zomatree
    @Zomatree
    cargo build
    Noa
    @coolreader18
    Yeah, make sure to build it optimized, non-release mode is definitely a lot slower
    Zomatree
    @Zomatree
    but an hour
    Noa
    @coolreader18
    Try release mode
    Zomatree
    @Zomatree
    im in release mode
    Noa
    @coolreader18
    ah
    what module are you importing?
    Zomatree
    @Zomatree
    aiohttp, attr, async_timeout, chardect, multidit, inda and yarl
    Zomatree
    @Zomatree
      PID USER      PRI  NI  VIRT   RES   SHR S CPU%▽MEM%   TIME+  Command
    30922 zomatree   20   0 11.5G 11.3G 12340 R 98.4 44.5  1h10:27 ./rustpython test.py
    does rustpython cache imports after they are imported once?
    Noa
    @coolreader18
    Yes, both as pyc in the filesystem and in sys.modules
    I don't think it should be taking that long
    How did you build ./rustpython?
    cargo build builds in debug mode
    you have to do cargo build --release to build optimized
    Zomatree
    @Zomatree
    https://mystb.in/AgentsFavorEncouraging i did build it in release mode
    Noa
    @coolreader18
    huh
    that is really strange
    I can't even import aiohttp, it errors after less than a second on a thing related to the typingmodule
    Zomatree
    @Zomatree
    i am using your branch with the metaclass patches
    Noa
    @coolreader18
    what does test.py look like? just import aiohttp?
    Zomatree
    @Zomatree
    yeah
    Noa
    @coolreader18
    I mean this fails after only a couple seconds