weichx

Results 19 comments of weichx

Sure, here is the C# I'd like to emulate ``` Vector3[] array = new Vector3[100]; // struct btw for(int i = 0; i < array.Length; i++) { ref Vector3 v...

I'm not currently, I'm not that worried about memory usage at expression compile time (which happens once on startup), but I care a lot about this stuff while the game...

yes exactly, right now the `ref` keyword cannot be used with ParameterExpression and I think thats just because the expression tree API got frozen before c# 7 when `ref` locals...

It would need to behave identically to the C# compiler's behavior. The example above is contrived. I'm building a language for people to write game code in that compiles to...

> Yes it should be possible, just get the address instead. But do you need to put all that code into expression or for instance only the body of the...

> @weichx Just updated my prev answer with code. > > Ok. I need to experiment with by-ref locals and ref assignments then. I'll keep you posted. Awesome, thanks a...

I've actually done some experiments with this before. By re-using DynamicMethod and IlGenerators I could reduce (on mono) allocations per delegate creation by 12. Performance wasn't directly impacted that much...

That was just a little prototype so I unfortunately don't have the code anymore but the gist of it was directly calling the internal C# runtime methods via reflection (or...

probably just getting the `m_Code` field yourself and not using the methods. Also be aware that the Mono implementation looks different, there is a very good chance you'll need two...

Glad you like the library, would love to know what you think is funky. (some things I know about and are a language limitation 👎 ) As far as this...