Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

performance improvements #196

Open
hannesm opened this issue Dec 13, 2017 · 1 comment
Open

performance improvements #196

hannesm opened this issue Dec 13, 2017 · 1 comment

Comments

@hannesm
Copy link
Member

hannesm commented Dec 13, 2017

to not loose the contents of closed PRs and issues, I collect potential performance improvements here.

@samoht mentioned here:
would be good to make the swap test only once by moving the check at the toplevel, e.g. something like:

  let get_uint64 =
    if Sys.big_endian then get_uint64 "BE"
    else (fun t i -> get_uint64 "BE" t i |> swap64)

Note: I haven't benchmarked this very extensively but it seems to go a bit faster than the current implementation.

@pqwy pasted the assembly of an accessor in #195

@pqwy proposed a benchmark in #194

@hannesm
Copy link
Member Author

hannesm commented Dec 13, 2017

a broader, very welcome plan would be to have a performance suite for libraries such as cstruct. is that in scope for the new OCaml build infrastructure @avsm @jpdeplaix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant