On 07/29/2012 11:43 AM, Erick Tryzelaar wrote:
Unfortunately there are some pretty severe performance issues at the moment. Ragel supports two state machine styles, table-driven and goto-driven. My backend uses tables, but since Rust doesn't yet support global constant vectors, I need to malloc the state machine table on every function call. This results in the [ragel-based url parser](https://github.com/erickt/ragel/blob/rust/examples/rust/url.rl) being about 10 times slower than the equivalent table-based parser in OCaml. You can see the generated code [here](https://gist.github.com/3200980).
Another thing you might try is using fixed-length vectors instead of heap-allocated vectors.
Patrick _______________________________________________ Rust-dev mailing list [email protected] https://mail.mozilla.org/listinfo/rust-dev
