ocaml/ocaml — pull request #4 by mmottl (2014-01-30 18:25:55+00:00)
Title: Fix for PR#4832 (Filling bigarrays may block out runtime)

This patch seems small and useful enough to test the new Github approach of contributing to the OCaml compiler. It is still untested, but probably correct.

The patch releases the OCaml lock when performing bigarray filling and blitting if the operation is big enough or if the involved bigarrays are memory-mapped. This allows for parallel processing (via other threads), which can improve performance and reduce latencies for large operations or if memory-mapped bigarrays may have to be fetched from disk.

Comments welcome!