From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 314817F89E for ; Fri, 21 Mar 2014 11:32:44 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jdimino@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of jdimino@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mx5.mail.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="postmaster@mx5.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnsCAB0VLFMmacjlnGdsb2JhbABZg0FXhEinX40/iHGBDx4OAQEBAQEGFgk8glMZAQE4JS0wEgEFASIBiAsDAgigdIsYhFUBBZ56EQaOKD6EQ5hNgTKJJ4IRg1gYKYRbgWs X-IPAS-Result: AnsCAB0VLFMmacjlnGdsb2JhbABZg0FXhEinX40/iHGBDx4OAQEBAQEGFgk8glMZAQE4JS0wEgEFASIBiAsDAgigdIsYhFUBBZ56EQaOKD6EQ5hNgTKJJ4IRg1gYKYRbgWs X-IronPort-AV: E=Sophos;i="4.97,703,1389740400"; d="scan'208";a="53556334" Received: from mx5.janestreet.com (HELO mx5.mail.janestreet.com) ([38.105.200.229]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 21 Mar 2014 11:32:29 +0100 Received: from tot-oib-smtp1.delacy.com ([172.27.22.15] helo=tot-smtp) by mx5.mail.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1WQwkU-0003s4-8s for caml-list@inria.fr; Fri, 21 Mar 2014 06:32:26 -0400 Received: from tot-dmz-mxgoog1.delacy.com ([172.27.224.14] helo=mxgoog2.janestreet.com) by tot-smtp with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WQwkU-0007rU-7m for caml-list@inria.fr; Fri, 21 Mar 2014 06:32:26 -0400 Received: from mail-ig0-f172.google.com ([209.85.213.172]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1WQwkU-0006Px-3z for caml-list@inria.fr; Fri, 21 Mar 2014 06:32:26 -0400 Received: by mail-ig0-f172.google.com with SMTP id uq10so993944igb.5 for ; Fri, 21 Mar 2014 03:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:date:message-id:subject:from:to:content-type; bh=E7G0VEX1mEXKk07q27GV3AcULMkggD2DvYGTnZdIVJ4=; b=ohQTQWQwIrdDKVnd+80byY4TPi25LkOrnKojr4g5Md6jt6Ii3z+KBCVGCDe/INf0hB ti44Nch+7EBQnejBzSFtG2ljMAr5hdStGGfN9Bsudn+d+Mbq+HW1WfShrE5/HnlTt59e soYJdaWOd4GzJIPE1wyv2ORAqb+vWbdWZndZE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=E7G0VEX1mEXKk07q27GV3AcULMkggD2DvYGTnZdIVJ4=; b=TYHTtNQaG3MZfT+MbWfXSW2UVih2/bISRmmpOfQCb1cOiT9ZYauvhbXi5WlIdYut7Y 7kMyFwrz5aTWhkg33EDvv20IKHkbLcOqPsLpAkctF1xxTjE2KNAxDA1VggPADSeernA/ ANiih3cCjj7k4TETxKEh8twuCf0MvLhRbyjyVpN9hS/4n9sfnLwPlUjhrweruK2pRUPP tY4y9o6m5Qdg8oV/OZIqwVCyd+h0OquSNboQUpwVlXAmEqrfjNgo+oV7YbTIlwcTHiHu I7QplMJZazf72WUYZJLAKhocjoEsTTfmFnpB19/KQOkttoV/KGcK8QdEatCoTrxVEzTt erbw== X-Received: by 10.50.50.41 with SMTP id z9mr1891571ign.16.1395397945865; Fri, 21 Mar 2014 03:32:25 -0700 (PDT) X-Gm-Message-State: ALoCoQl7wPpf55IDNSi4aq/LIcdvNpHA32hTFLWC7+amjCfixQaBWrAJHRorFbWXL6hr923yTAJFuyaOluh+FoMCwS36ZRXB0drKiiCTVu6I04hH0CPKmb0LXKxqOiVoX1Tm35AUTiTz8hHg9/RYJWhjAC9inLE97Q== MIME-Version: 1.0 X-Received: by 10.50.50.41 with SMTP id z9mr1891189ign.16.1395397939910; Fri, 21 Mar 2014 03:32:19 -0700 (PDT) Received: by 10.50.114.38 with HTTP; Fri, 21 Mar 2014 03:32:19 -0700 (PDT) Date: Fri, 21 Mar 2014 10:32:19 +0000 Message-ID: From: Jeremie Dimino To: ocaml-core@googlegroups.com, "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=089e011835da9fdd3604f51b6673 Subject: [Caml-list] [ANN] Core Suite 111.06.00 + async_ssl --089e011835da9fdd3604f51b6673 Content-Type: text/plain; charset=ISO-8859-1 I am pleased to announce the 111.06.00 release of the Core suite. A new package appears with this release: async_ssl. It is an Async-pipe-based interface with OpenSSL. Bindings to OpenSSL are written with ctypes. The following packages were upgraded: - async_extra - async_kernel - async_unix - core - core_extended - core_kernel - jenga - re2 - textutils - typerep Files and documentation for this release are available on our website and all packages are in opam: https://ocaml.janestreet.com/ocaml-core/111.06.00/individual/ https://ocaml.janestreet.com/ocaml-core/111.06.00/doc/ Here is list of changes for this version: # 111.06.00 ## async_extra - Added `?on_wouldblock:(unit -> unit)` callback to `Udp.recvmmsg_loop` and `recvmmsg_no_sources_loop`. - For functions that create `Rpc` connections, added optional arguments: `?max_message_size:int` and `?handshake_timeout:Time.Span.t`. These arguments were already available to `Connection.create`, but are now uniformly available to all functions that create connections. ## async_kernel - Improved the performance of `Pipe.filter_map` by using batching. ## async_ssl Initial release ## async_unix - In the `Busy_pollers.t` record, made the `kernel_scheduler` field be `sexp_opaque`. Did this so that one doesn't get two copies of the kernel scheduler in sexps of the scheduler, which already has its own `kernel_scheduler` field. ## core - Added inline benchmarks for =Iobuf= and =Time=. Hera are some of the results from the new benchmarks, with some indexed tests dropped. | Name | Time/Run | mWd/Run | Percentage | |--------------------------------------|----------|---------|------------| | [time.ml:Time] Time.to_string | 848.74ns | 249.98w | 100.00% | | [time.ml:Time] Time.to_ofday | 59.66ns | 38.00w | 7.03% | | [time.ml:Time] Time.now | 39.78ns | 2.00w | 4.69% | | [time.ml:Time] Time.Zone.find_office | 83.64ns | 4.00w | 9.85% | | [time.ml:Time] Time.Span.of_hr | 3.71ns | 2.00w | 0.44% | | [time.ml:Time] Time.Span.of_min | 3.69ns | 2.00w | 0.44% | | [time.ml:Time] Time.Span.of_sec | 2.72ns | | 0.32% | | [time.ml:Time] Time.Span.of_ms | 6.02ns | 2.00w | 0.71% | | [time.ml:Time] Time.Span.of_ns | 5.98ns | 2.00w | 0.71% | | Name | Time/Run | Percentage | |------------------------------------------|----------|------------| | [iobuf.ml:Blit tests] functor blit:5 | 15.53ns | 7.66% | | [iobuf.ml:Poke tests] char:0 | 4.11ns | 2.03% | | [iobuf.ml:Poke tests] uint8:0 | 5.35ns | 2.64% | | [iobuf.ml:Poke tests] int8:0 | 4.59ns | 2.26% | | [iobuf.ml:Poke tests] int16_be:0 | 5.19ns | 2.56% | | [iobuf.ml:Poke tests] int16_le:0 | 5.14ns | 2.53% | | [iobuf.ml:Poke tests] uint16_be:0 | 5.11ns | 2.52% | | [iobuf.ml:Poke tests] uint16_le:0 | 5.12ns | 2.53% | | [iobuf.ml:Poke tests] int32_be:0 | 5.17ns | 2.55% | | [iobuf.ml:Poke tests] int32_le:0 | 4.91ns | 2.42% | | [iobuf.ml:Poke tests] uint32_be:0 | 5.73ns | 2.83% | | [iobuf.ml:Poke tests] uint32_le:0 | 5.74ns | 2.83% | | [iobuf.ml:Poke tests] int64_be:0 | 5.33ns | 2.63% | | [iobuf.ml:Poke tests] int64_le:0 | 4.93ns | 2.43% | | [iobuf.ml:Peek tests] char:0 | 5.50ns | 2.71% | | [iobuf.ml:Peek tests] uint8:0 | 4.68ns | 2.31% | | [iobuf.ml:Peek tests] int8:0 | 4.91ns | 2.42% | | [iobuf.ml:Peek tests] int16_be:0 | 5.19ns | 2.56% | | [iobuf.ml:Peek tests] int16_le:0 | 4.90ns | 2.42% | | [iobuf.ml:Peek tests] uint16_be:0 | 5.17ns | 2.55% | | [iobuf.ml:Peek tests] uint16_le:0 | 5.10ns | 2.51% | | [iobuf.ml:Peek tests] int32_be:0 | 5.17ns | 2.55% | | [iobuf.ml:Peek tests] int32_le:0 | 4.92ns | 2.42% | | [iobuf.ml:Peek tests] uint32_be:0 | 5.45ns | 2.69% | | [iobuf.ml:Peek tests] uint32_le:0 | 5.46ns | 2.69% | | [iobuf.ml:Peek tests] int64_be:0 | 6.61ns | 3.26% | | [iobuf.ml:Peek tests] int64_le:0 | 6.31ns | 3.11% | - Re-implemented `Thread_safe_queue` to improve performance and reduce allocation. The new implementation requires 3 words per element, down from the 7 words required by the old implementation. The new implementation pools elements so that they can be reused, so there is no allocation in steady-state use. The new implementation has `dequeue_exn` rather than `dequeue`, so that one can dequeue without allocating 2 words. Eliminated `create'`. One should just use `create` and explicit calls to `enqueue` and `dequeue_exn`. Eliminated `dequeue_until_empty`. One should use an explicit while loop guarded by `length` and using `dequeue_exn`. Moved `Thread_safe_queue` from `Core_kernel` to `Core`, since it's thread related. All in, there is now no allocation in a steady-state usage of enqueueing and dequeueing elements, as opposed to 9 words per `enqueue+dequeue` in the old implementation. This reduces the cost from `enqueue+dequeue` taking 166-216ns to `enqueue+dequeue_exn` taking 48-82ns (plus eliminating gc impacts). Here are some `BENCH` results, the first table being the old implementation, and the second table the new. | Name | Time/Run | mWd/Run | mjWd/Run | |------------------------------------------------------------|----------|---------|----------| | [thread_safe_queue.ml] enqueue + dequeue of immediate | 183.89ns | 9.00w | 7.02w | | [thread_safe_queue.ml] enqueue + dequeue of young object | 216.69ns | 11.00w | 9.01w | | [thread_safe_queue.ml] enqueue + dequeue_exn of old object | 166.75ns | 9.00w | 7.02w | | Name | Time/Run | mWd/Run | |--------------------------------------------------------------|----------|---------| | [thread_safe_queue.ml] enqueue + dequeue_exn of immediate | 48.20ns | | | [thread_safe_queue.ml] enqueue + dequeue_exn of young object | 81.96ns | 2.00w | | [thread_safe_queue.ml] enqueue + dequeue_exn of old object | 48.30ns | | - Changed `{Bigstring,Iobuf}.recvmmsg_assume_fd_is_nonblocking`, when no message is available, to return a negative number rather than raise. This was done for performance reasons, because raising an exception is expensive, due to the stashing of the backtrace and the string creation. - Added `Iobuf.unsafe_resize`. - Changed `Bigstring.blit` so that it doesn't release the OCaml lock on `map_file` bigstrings. The old behavior of releasing the lock for blits of (small) bigstrings involving mmapped files was problematic and inconsistent. Its cost is high, and fundamentally any access to a mapped bigstring could cause some level of blocking. - Added time-related `Arg_type.t` values to `Command.Spec`. - Added module `Type_immediacy`, which has witnesses that express whether a type's values are always, sometimes, or never immediate. This code used to be in the `Typerep_immediate` library in typerep. ## core_kernel - Added inline benchmarks for `Array` Hera are some of the results from the new benchmarks, with some indexed tests dropped. | Name | Time/Run | mWd/Run | mjWd/Run | |-----------------------------------------------------|-------------|---------|-----------| | [core_array.ml:Alloc] create:0 | 13.65ns | | | | [core_array.ml:Alloc] create:100 | 99.83ns | 101.00w | | | [core_array.ml:Alloc] create:255 | 201.32ns | 256.00w | | | [core_array.ml:Alloc] create:256 | 1_432.43ns | | 257.00w | | [core_array.ml:Alloc] create:1000 | 5_605.58ns | | 1_001.01w | | [core_array.ml:Blit.Poly] blit (tuple):10 | 87.10ns | | | | [core_array.ml:Blit.Poly] blito (tuple):10 | 112.14ns | 2.00w | | | [core_array.ml:Blit.Poly] blit (int):10 | 85.25ns | | | | [core_array.ml:Blit.Poly] blito (int):10 | 107.23ns | 2.00w | | | [core_array.ml:Blit.Poly] blit (float):10 | 84.71ns | | | | [core_array.ml:Blit.Poly] blito (float):10 | 86.71ns | 2.00w | | | [core_array.ml:Blit.Int] blit:10 | 19.77ns | | | | [core_array.ml:Blit.Int] blito:10 | 23.54ns | 2.00w | | | [core_array.ml:Blit.Float] blit:10 | 19.87ns | | | | [core_array.ml:Blit.Float] blito:10 | 24.12ns | 2.00w | | | [core_array.ml:Is empty] Polymorphic '=' | 18.21ns | | | | [core_array.ml:Is empty] Array.equal | 8.08ns | 6.00w | | | [core_array.ml:Is empty] phys_equal | 2.98ns | | | | [core_array.ml:Is empty] Array.is_empty (empty) | 2.98ns | | | | [core_array.ml:Is empty] Array.is_empty (non-empty) | 3.00ns | | | - Moved `Thread_safe_queue` to core - Generalized the type of `Exn.handle_uncaught_and_exit` to `(unit -> 'a) -> 'a`. In the case where `handle_uncaught_and_exit` succeeds, it can return the value of the supplied function. It's type had been: ```ocaml val handle_uncaught_and_exit : (unit -> never_returns) -> never_returns ``` - Added `Int.round*` functions for rounding to a multiple of another int. ```ocaml val round : ?dir:[ `Zero | `Nearest | `Up | `Down ] -> t -> to_multiple_of:t -> t val round_towards_zero : t -> to_multiple_of:t -> t val round_down : t -> to_multiple_of:t -> t val round_up : t -> to_multiple_of:t -> t val round_nearest : t -> to_multiple_of:t -> t ``` These functions were added to `Int_intf.S`, implemented by `Int`, `Nativeint`, `Int32`, and `Int64`. Various int modules were also lightly refactored to make it easier in the future to implement common operators available for all modules implementing the int interface via a functor to share the code. ## jenga - Improved the error message when the same library is defined multiple times. - Fixed an issue where jenga sometimes would sometimes complain about a self cycle when `foo.ml` uses a module `Foo`. - With `-no-notifiers`, jenga doesn't use `inotify` to watch for file changes. This is useful for linting `jengaroot.ml`. - Allowed writing jenga rules which restrict dependencies from an initial conservative approximation to a more accurate set discovered after an action is run ## re2 - Added `Re2.Std`, so that one should now use `Re2` via `module Re2 = Re2.Std.Re2`. At some future date, we will rename the `Regex` module to `Re2_internal` to force the stragglers to update to the new convention. ## typerep - Renamed `Typerep` libraries for more consistency with the rest of the framework. ```ocaml Typerep_kernel --> Typerep_lib Typerep_core --> Typerep_extended Typereplib --> Typerep_experimental ``` -- Jeremie Dimino, for the Core team --089e011835da9fdd3604f51b6673 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I am pleased to announce the 111.06.00 release of the= Core suite.

A new package appears with this relea= se: async_ssl. It is an
Async-pipe-based interface with OpenSSL. = Bindings to OpenSSL are
written with ctypes.

The following packages w= ere upgraded:

- async_extra
- async_kern= el
- async_unix
- core
- core_extended
- core_kernel
- jenga
- re2
- textutils<= /div>
- typerep

Files and documentation for th= is release are available on our
website and all packages are in o= pam:


Here is list of changes for this version:
# 111.06.00

## async_extra
<= br>
- Added `?on_wouldblock:(unit -> unit)` callback to
=A0 `Udp.recvmmsg_loop` and `recvmmsg_no_sources_loop`.
- Fo= r functions that create `Rpc` connections, added optional
=A0 arg= uments: `?max_message_size:int` and
=A0 `?handshake_timeout:Time.= Span.t`.

=A0 These arguments were already available to `Connecti= on.create`, but
=A0 are now uniformly available to all functions = that create
=A0 connections.

## async_ke= rnel

- Improved the performance of `Pipe.filter_map` by usin= g batching.

## async_ssl

= Initial release

## async_unix

- In the `Busy_pollers.t` record, made the `kernel_scheduler` field be=
=A0 `sexp_opaque`.

=A0 Did this so that= one doesn't get two copies of the kernel scheduler
=A0 in se= xps of the scheduler, which already has its own
=A0 `kernel_scheduler` field.

## core


=A0 indexed tests dropped.

=A0 | Name =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | Time/Run | mWd/R= un | Percentage |
=A0 |--------------------------------------|---= -------|---------|------------|
=A0 | [time.ml:Time] Time.to_string =A0 =A0 =A0 =A0| 848.74ns | 249.98= w | =A0 =A0100.00% |
=A0 | [time.ml:Time] Time.to_ofday =A0 =A0 = =A0 =A0 | =A059.66ns | =A038.00w | =A0 =A0 =A07.03% |
=A0 | [time= .ml:Time] Time.now =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A039.78ns | =A0 2.00w | = =A0 =A0 =A04.69% |
=A0 | [time.ml:Time] Time.Zone.find_office | =A083.64ns | =A0 4.00w | = =A0 =A0 =A09.85% |
=A0 | [time.ml:Time] Time.Span.of_hr =A0 =A0 = =A0 | =A0 3.71ns | =A0 2.00w | =A0 =A0 =A00.44% |
=A0 | [time.ml:= Time] Time.Span.of_min =A0 =A0 =A0| =A0 3.69ns | =A0 2.00w | =A0 =A0 =A00.4= 4% |
=A0 | [time.ml:Time] Time.Span.of_sec =A0 =A0 =A0| =A0 2.72ns | =A0 = =A0 =A0 =A0 | =A0 =A0 =A00.32% |
=A0 | [time.ml:Time] Time.Span.o= f_ms =A0 =A0 =A0 | =A0 6.02ns | =A0 2.00w | =A0 =A0 =A00.71% |
= =A0 | [time.ml:Time] Time.Span.of_ns =A0 =A0 =A0 | =A0 5.98ns | =A0 2.00w |= =A0 =A0 =A00.71% |

=A0 | Name =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 | Time/Run | Percentage |
=A0 |------= ------------------------------------|----------|------------|
=A0= | [iobuf.ml:Blit tests] functor blit:5 =A0 =A0 | =A015.53ns | =A0 =A0 =A07= .66% |
=A0 | [iobuf.ml:Poke tests] char:0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 4.11n= s | =A0 =A0 =A02.03% |
=A0 | [iobuf.ml:Poke tests] uint8:0 =A0 = =A0 =A0 =A0 =A0 =A0| =A0 5.35ns | =A0 =A0 =A02.64% |
=A0 | [iobuf= .ml:Poke tests] int8:0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 4.59ns | =A0 =A0 =A02.= 26% |
=A0 | [iobuf.ml:Poke tests] int16_be:0 =A0 =A0 =A0 =A0 | =A0 5.19ns | = =A0 =A0 =A02.56% |
=A0 | [iobuf.ml:Poke tests] int16_le:0 =A0 =A0= =A0 =A0 | =A0 5.14ns | =A0 =A0 =A02.53% |
=A0 | [iobuf.ml:Poke t= ests] uint16_be:0 =A0 =A0 =A0 =A0| =A0 5.11ns | =A0 =A0 =A02.52% |
=A0 | [iobuf.ml:Poke tests] uint16_le:0 =A0 =A0 =A0 =A0| =A0 5.12ns | = =A0 =A0 =A02.53% |
=A0 | [iobuf.ml:Poke tests] int32_be:0 =A0 =A0= =A0 =A0 | =A0 5.17ns | =A0 =A0 =A02.55% |
=A0 | [iobuf.ml:Poke t= ests] int32_le:0 =A0 =A0 =A0 =A0 | =A0 4.91ns | =A0 =A0 =A02.42% |
=A0 | [iobuf.ml:Poke tests] uint32_be:0 =A0 =A0 =A0 =A0| =A0 5.73ns | = =A0 =A0 =A02.83% |
=A0 | [iobuf.ml:Poke tests] uint32_le:0 =A0 = =A0 =A0 =A0| =A0 5.74ns | =A0 =A0 =A02.83% |
=A0 | [iobuf.ml:Poke= tests] int64_be:0 =A0 =A0 =A0 =A0 | =A0 5.33ns | =A0 =A0 =A02.63% |
=A0 | [iobuf.ml:Poke tests] int64_le:0 =A0 =A0 =A0 =A0 | =A0 4.93ns | = =A0 =A0 =A02.43% |
=A0 | [iobuf.ml:Peek tests] char:0 =A0 =A0 =A0= =A0 =A0 =A0 | =A0 5.50ns | =A0 =A0 =A02.71% |
=A0 | [iobuf.ml:Pe= ek tests] uint8:0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 4.68ns | =A0 =A0 =A02.31% |<= /div>
=A0 | [iobuf.ml:Peek tests] int8:0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 4.91n= s | =A0 =A0 =A02.42% |
=A0 | [iobuf.ml:Peek tests] int16_be:0 =A0= =A0 =A0 =A0 | =A0 5.19ns | =A0 =A0 =A02.56% |
=A0 | [iobuf.ml:Pe= ek tests] int16_le:0 =A0 =A0 =A0 =A0 | =A0 4.90ns | =A0 =A0 =A02.42% |
=A0 | [iobuf.ml:Peek tests] uint16_be:0 =A0 =A0 =A0 =A0| =A0 5.17ns | = =A0 =A0 =A02.55% |
=A0 | [iobuf.ml:Peek tests] uint16_le:0 =A0 = =A0 =A0 =A0| =A0 5.10ns | =A0 =A0 =A02.51% |
=A0 | [iobuf.ml:Peek= tests] int32_be:0 =A0 =A0 =A0 =A0 | =A0 5.17ns | =A0 =A0 =A02.55% |
=A0 | [iobuf.ml:Peek tests] int32_le:0 =A0 =A0 =A0 =A0 | =A0 4.92ns | = =A0 =A0 =A02.42% |
=A0 | [iobuf.ml:Peek tests] uint32_be:0 =A0 = =A0 =A0 =A0| =A0 5.45ns | =A0 =A0 =A02.69% |
=A0 | [iobuf.ml:Peek= tests] uint32_le:0 =A0 =A0 =A0 =A0| =A0 5.46ns | =A0 =A0 =A02.69% |
=A0 | [iobuf.ml:Peek tests] int64_be:0 =A0 =A0 =A0 =A0 | =A0 6.61ns | = =A0 =A0 =A03.26% |
=A0 | [iobuf.ml:Peek tests] int64_le:0 =A0 =A0= =A0 =A0 | =A0 6.31ns | =A0 =A0 =A03.11% |
- Re-implemented `Thre= ad_safe_queue` to improve performance and reduce
=A0 allocation.

=A0 The new implementation re= quires 3 words per element, down from the 7
=A0 words required by= the old implementation.

=A0 The new implementatio= n pools elements so that they can be reused, so
=A0 there is no allocation in steady-state use.

=A0 The new implementation has `dequeue_exn` rather than `dequeue`, so
=A0 that one can dequeue without allocating 2 words.
=A0 Eliminated `create'`. =A0One should just use `create` and expl= icit calls
=A0 to `enqueue` and `dequeue_exn`.

=A0 Eliminated `dequeue_until_empty`. =A0One should use an explicit = while
=A0 loop guarded by `length` and using `dequeue_exn`.

=A0 Moved `Thread_safe_queue` from `Core_kernel` to `Core`, since = it's
=A0 thread related.

=A0 All in,= there is now no allocation in a steady-state usage of
=A0 enqueueing and dequeueing elements, as opposed to 9 words per
=A0 `enqueue+dequeue` in the old implementation. =A0This reduces the = cost
=A0 from `enqueue+dequeue` taking 166-216ns to `enqueue+dequ= eue_exn`
=A0 taking 48-82ns (plus eliminating gc impacts). =A0Here are some `BE= NCH`
=A0 results, the first table being the old implementation, a= nd the
=A0 second table the new.

=A0 | N= ame =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | Time/Run | mWd/Run | mjWd/Run |
=A0 |------------------------------------------------------------|----= ------|---------|----------|
=A0 | [thread_safe_queue.ml] enqueue + dequeue of immediate =A0 =A0= =A0| 183.89ns | =A0 9.00w | =A0 =A07.02w |
=A0 | [thread_safe_= queue.ml] enqueue + dequeue_exn of old object | 166.75ns | =A0 9.00w | = =A0 =A07.02w |

=A0 | Name =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | Time/= Run | mWd/Run |
=A0 |--------------------------------------------= ------------------|----------|---------|
=A0 | [thread_safe_queue.ml] enqueue + dequeue_exn of i= mmediate =A0 =A0| =A048.20ns | =A0 =A0 =A0 =A0 |
=A0 | [thread_safe_queue.ml]= enqueue + dequeue_exn of old object =A0 | =A048.30ns | =A0 =A0 =A0 =A0 |
- Changed `{Bigstring,Iobuf}.recvmmsg_assume_fd_is_nonblocking`, when<= /div>
=A0 no message is available, to return a negative number rather t= han
=A0 raise.

=A0 This was done for per= formance reasons, because raising an exception
=A0 is expensive, due to the stashing of the backtrace and the string<= /div>
=A0 creation.
- Added `Iobuf.unsafe_resize`.
= - Changed `Bigstring.blit` so that it doesn't release the OCaml lock
=A0 on `map_file` bigstrings.

=A0 The old beh= avior of releasing the lock for blits of (small)
=A0 bigstrings i= nvolving mmapped files was problematic and inconsistent.
=A0 Its = cost is high, and fundamentally any access to a mapped bigstring
=A0 could cause some level of blocking.
- Added time-related= `Arg_type.t` values to `Command.Spec`.
- Added module `Type_imme= diacy`, which has witnesses that express
=A0 whether a type's= values are always, sometimes, or never immediate.

=A0 This code used to be in the `Typerep_immediate` lib= rary in typerep.

## core_kernel

- Added inline benchmarks for `Array`

=A0 H= era are some of the results from the new benchmarks, with some
=A0 indexed tests dropped.

=A0 | Name =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0| =A0 =A0Time/Run | mWd/Run | =A0mjWd/Run |
=A0 |-= ----------------------------------------------------|-------------|--------= -|-----------|
=A0 | [core_array.ml:Alloc] create:0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0| =A0 =A0 13.65ns | =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Alloc] create:100 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0| =A0 =A0 99.83ns | 101.00w | =A0 =A0 =A0 =A0 =A0 |
= =A0 | [core_array.ml:Alloc] create:255 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0| =A0 =A0201.32ns | 256.00w | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Alloc] create:256 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0| =A01_432.43ns | =A0 =A0 =A0 =A0 | =A0 257.00w |
=A0 | [= core_array.ml:Alloc] create:1000 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A05= _605.58ns | =A0 =A0 =A0 =A0 | 1_001.01w |
=A0 | [core_array.ml:Bl= it.Poly] blit (tuple):10 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 87.10ns | =A0 =A0 = =A0 =A0 | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Blit.Poly] blito (tuple):10 =A0 =A0 =A0 =A0 =A0| = =A0 =A0112.14ns | =A0 2.00w | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_a= rray.ml:Blit.Poly] blit (int):10 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 =A0 85.25ns = | =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Bl= it.Poly] blito (int):10 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A0107.23ns | =A0 2.00= w | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Blit.Poly] blit (float):10 =A0 =A0 =A0 =A0 =A0 | = =A0 =A0 84.71ns | =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 |
=A0 | [= core_array.ml:Blit.Poly] blito (float):10 =A0 =A0 =A0 =A0 =A0| =A0 =A0 86.7= 1ns | =A0 2.00w | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Blit= .Int] blit:10 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| =A0 =A0 19.77ns | = =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Blit.Int] blito:10 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 | =A0 =A0 23.54ns | =A0 2.00w | =A0 =A0 =A0 =A0 =A0 |
=A0= | [core_array.ml:Blit.Float] blit:10 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0| = =A0 =A0 19.87ns | =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 |
=A0 | [= core_array.ml:Blit.Float] blito:10 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0 = =A0 24.12ns | =A0 2.00w | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Is empty] Polymorphic '=3D' =A0 =A0 =A0 = =A0 =A0 =A0| =A0 =A0 18.21ns | =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Is empty] Array.equal =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0| =A0 =A0 =A08.08ns | =A0 6.00w | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml:Is empty] phys_equal =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 |= =A0 =A0 =A02.98ns | =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 |
=A0 = | [core_array.ml:Is empty] Array.is_empty (empty) =A0 =A0 | =A0 =A0 =A02.98= ns | =A0 =A0 =A0 =A0 | =A0 =A0 =A0 =A0 =A0 |
=A0 | [core_array.ml= :Is empty] Array.is_empty (non-empty) | =A0 =A0 =A03.00ns | =A0 =A0 =A0 =A0= | =A0 =A0 =A0 =A0 =A0 |
- Moved `Thread_safe_queue` to core
- Generalized the type o= f `Exn.handle_uncaught_and_exit` to `(unit ->
=A0 'a) ->= ; 'a`.

=A0 In the case where `handle_uncaught_= and_exit` succeeds, it can return
=A0 the value of the supplied function.

=A0 I= t's type had been:

=A0 ```ocaml
=A0 = val handle_uncaught_and_exit : (unit -> never_returns) -> never_retur= ns
=A0 ```
- Added `Int.round*` functions for rounding to a mul= tiple of another
=A0 int.

=A0 ```ocaml
=A0 val round : ?dir:[ `Zero | `Nearest | `Up | `Down ] -> t -&= gt; to_multiple_of:t -> t

=A0 val round_towards_zero : t -> to_multiple_of:t -= > t
=A0 val round_down =A0 =A0 =A0 =A0 : t -> to_multiple_o= f:t -> t
=A0 val round_up =A0 =A0 =A0 =A0 =A0 : t -> to_mul= tiple_of:t -> t
=A0 val round_nearest =A0 =A0 =A0: t -> to_multiple_of:t -> t
=A0 ```

=A0 These functions were added to = `Int_intf.S`, implemented by `Int`,
=A0 `Nativeint`, `Int32`, and= `Int64`.

=A0 Various int modules were also lightly refactored to= make it easier
=A0 in the future to implement common operators a= vailable for all
=A0 modules implementing the int interface via a= functor to share the
=A0 code.

## jenga

-= Improved the error message when the same library is defined multiple
=
=A0 times.
- Fixed an issue where jenga sometimes would some= times complain about
=A0 a self cycle when `foo.ml` uses a mo= dule `Foo`.
- With `-no-notifiers`, jenga doesn't use `inotif= y` to watch for file
=A0 changes. =A0This is useful for linting `= jengaroot.ml`.
- Allowed writing jenga rules which restrict dependencies from an
=A0 initial conservative approximation to a more accurate set discove= red
=A0 after an action is run

## re2

- Added `Re2.Std`, so that one should now use `Re2` via= `module Re2 =3D
=A0 Re2.Std.Re2`.

=A0 A= t some future date, we will rename the `Regex` module to
=A0 `Re2= _internal` to force the stragglers to update to the new
=A0 convention.

## typerep

- Renamed `Typerep` libraries for more consistency with the rest of<= /div>
=A0 the framework.

=A0 ```ocaml
=A0 Typerep_kernel --> Typerep_lib
=A0 Typerep_core =A0 -->= Typerep_extended
=A0 Typereplib =A0 =A0 --> Typerep_experimen= tal
=A0 ```

--=A0
Jeremie Dimi= no, for the Core team

--089e011835da9fdd3604f51b6673--