Skip to content

Reduce copies between ocaml Strings and Bytes

Marcello Seri xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1tools: reduce copies b/w ocaml Strings and Bytestools/ocaml/libs/xb/xb.ml tools/ocaml/xenstored/logging.ml tools/ocaml/xenstored/stdext.ml +1 more+12 -82 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchChristian Lindig
1/1R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [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(-)
Signature · 7 lines
2.14.1


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel