[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 0/1] Reduce copies between ocaml Strings and Bytes



The port of the ocaml libraries to the new safe-string interface
introduced some unnecessary copies between ocaml strings and bytes. The
bytes module provides unsafe conversion functions that avoid the copies
and are safe to use when the bytes are used immutably (as in Unix.write
calls) or when the ownership of the bytes is clear. For reference see
https://caml.inria.fr/pub/docs/manual-ocaml/libref/Bytes.html#3_Unsafeconversionsforadvancedusers

This patch replaces the conversion functions with unsafe conversions
when possible.

Marcello Seri (1):
  tools: reduce copies b/w ocaml Strings and Bytes

 tools/ocaml/libs/xb/xb.ml        | 4 +++-
 tools/ocaml/xenstored/logging.ml | 8 +++++---
 tools/ocaml/xenstored/stdext.ml  | 2 +-
 tools/ocaml/xenstored/utils.ml   | 6 +++---
 4 files changed, 12 insertions(+), 8 deletions(-)

-- 
2.14.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.