jrouaix / csharp-expr-rs

c# expression parser in Rust [very experimental]
MIT License
7 stars 0 forks source link

This is not as fast as C#, and I stronly suspect it's because of the C# String to Rust FFI passing #1

Open jrouaix opened 4 years ago

jrouaix commented 4 years ago

To sum up what is done when an already parsed expression is call from C# :

It's really a pitty !

Is there a way to send a string usable directly from Rust, or to send a raw dotnet pointer to the String an allow Rust to go digging the value right into C# managed memory ... I need help here ...

jrouaix commented 4 years ago

Some benchmark : see how a single use of a big sized string mess down all the adventage of the Rust lib ? image

jrouaix commented 4 years ago

Seems possible to get a string from C# .net without having .net do to conversation ... this way I could lazy decode the string on demand ... image

jrouaix commented 4 years ago

suggested from : https://twitter.com/ryan_levick/status/1214523004903968768