Jacob Lifshay
Jacob Lifshay
any progress?
> I don't know why `BigRational` is nearly three orders of magnitude slower than `isize`. My gut is telling me it should be possible to bring both `BigInt` and `BigRational`...
`softfloat_countLeadingZeros32` is defined when `build/Linux-x86_64-GCC/platform.h` is included, so the out-of-line version in `source/s_countLeadingZeros32.c` is `#ifdef`-ed out.
other cases where masking could be a performance hit -- cpus that are introducing range-checked load/store instructions specifically for wasm32/64.
> Do we have an example of that @programmerjake? I do not know of any such cpu proposal today. yes, beginnings of a proposal for PowerISA: https://bugs.libre-soc.org/show_bug.cgi?id=585
I haven't checked, but doing [the same thing as boost python](https://www.boost.org/doc/libs/1_71_0/libs/python/doc/html/reference/high_level_components/boost_python_enum_hpp.html) might work
I have some messy code that you can use as a reference: https://salsa.debian.org/Kazan-team/simple-soft-float/-/blob/e19291a0b8eb17e9b52c09b8e670bf0fe3244989/src/python_macros.rs
an expanded example with what I'd expect: ```rust pub enum MyEnum { A, B(), C {}, D(i8, i16), E {a: u8, b: String}, } ``` should be matchable like so:...
imho a separate class per variant may be the most useful, since python 3.10 added pattern matching: https://docs.python.org/3/reference/compound_stmts.html#the-match-statement the variant classes should be inside the base enum class, so they...
> ```python > enum = MyEnum.B() > assert isinstance(enum, MyEnum.B) > > enum.set_to_a() > assert isinstance(enum, MyEnum.A) > ``` > > Is such a thing possible? yes, `isinstance` and `issubclass`...