There is no realloc in OCaml memory.h or alloc.h (byterun / caml). Does this mean that it is not possible to redistribute the OCaml GC block (or value)? The use case I think of is a concat line where the following can be optimized using realloc:
a = a ^ b
In my tests, the concat string actually works faster in PHP (5.5) than the compiled OCaml (4.02.1).
Change . In another test, it’s Buffermuch faster than PHP concat, and still faster than OCaml concat even when converting a buffer to a string in each iteration of the loop. Code .
Buffer
, realloc() -style OCaml.
realloc()
realloc() ; . , , .
OCaml ; GC ; . . , .
, realloc() OCaml GC.
, realloc() - , PHP, OCaml. , -, . , , , .
, OCaml Buffer, . , , , ^ ( ).
^
Source: https://habr.com/ru/post/1607731/More articles:How to scroll a div when ajax is used to load data in selenium python - javascriptPreferenceCategory in CardView - javaSelenium: retrieves data that loads when scrolling down - pythonfailed to import org.sun.management.OperatingSystemMXBean in java class? - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1607730/passing-a-list-of-columns-to-order-function-in-r&usg=ALkJrhinwX0N3raLK0KTyDAMgI4-Hx5L8APhantomJS acts differently than Firefox webdriver - javascriptThe debugger does not work with "This operation is not supported by the callback function." - javascriptФормат Clang удаляет все пробелы в моих пустых строках - xcodeHow to use AWS KMS in AWS lambda - aws-lambdaGoogle Scripts / Basic JavaScript - fixed by debugger - javascriptAll Articles