Delyan Angelov
Delyan Angelov
For me, with latest V: ```c string main__St_str(main__St s) { string _t1 = Array_u8_bytestr(s.a); return _t1; } VV_LOCAL_SYMBOL void main__confuser(main__St* s) { array_push_noscan((array*)&s->a, _MOV((u8[]){ 'a' })); array_push_noscan((array*)&s->a, _MOV((u8[]){ 'b' }));...
> I am calling str on a mutable object, but it works. Whether the receiver is mutable or not, only matters if you want to modify the receiver inside the...
> Calling confuser does not change s, it was and is still mut. But then, the SAME call to s.str() behaves differently. I agree - it should have the same...
Just curious, what is the content of `wordle_min.json` ? Edit: just saw that you linked it - .
The problem has nothing to do with channels. ```v fn contains_char(s string, c u8) bool { for x in s { if x == c { return true } }...
Here is the faster version for your amusement :-) https://gist.github.com/spytheman/2b9fc468664f0ac73b258c065daf577e
Implemented in https://github.com/vlang/v/pull/17702 .
To use `.contains()`, you have to also call `.ascii_str()` for each character, and that in turn allocates a new string. The `.contains_u8()` version in the PR from above, allows you...
> Wow! Combining `-cc msvc` with your code, I got my execution speed down to ~80ms. I tested on Ubuntu 20.04, with Intel i3-3225, and a mostly quiet system: 
Without -prod (i.e. with tcc):  which is still faster than before, but slower than the Go version (which always does optimizations, while tcc does not, so that is expected).