| 1 | |
| 2 | ## Release v0.17.0 |
| 3 | |
| 4 | - Add "local" versions of various functions and signatures: `bin_write_t__local`, |
| 5 | `S_local`, etc. Modal types are not supported by the public OCaml compiler, so the |
| 6 | local type annotations are erased at the moment. |
| 7 | |
| 8 | - Add `Bin_prot.Util.Of_minimal1`, which is a version of `Bin_prot.Util.Of_minimal` |
| 9 | with different arity. |
| 10 | |
| 11 | ## Release v0.16.0 |
| 12 | |
| 13 | Insert the changelog here. When making the release, we will keep this |
| 14 | section and delete the section above. |
| 15 | |
| 16 | - In `Bin_prot.Bin_shape`, expose the structure of `Expert.Canonical.t` |
| 17 | * The purpose is so that custom bin shape traversals can be built. |
| 18 | |
| 19 | - Add a `stable_witness` idiom |
| 20 | * This is an idiom of stable types that is checked by the compiler, instead of relying on convention. |
| 21 | |
| 22 | - Remove deprecated functions for dealing with float arrays. |
| 23 | * Users should now use `ppx_bin_prot` with type `float array` or `floatarray` |
| 24 | |
| 25 | - Remove the deprecated `Make_binable*` functor family |
| 26 | * Users are advised to use `*_with_uuid` or `*_without_uuid` alternatives |
| 27 | |
| 28 | ## Old pre-v0.15 changelogs (very likely stale and incomplete) |
| 29 | |
| 30 | ## 113.43.00 |
| 31 | |
| 32 | - Converted `bin_prot` to use `%expect` tests. No functional changes. |
| 33 | |
| 34 | - Added `Maximum` and `Minimum` submodules to `Size` so to allow for |
| 35 | easy estimation of the space required for simple bin_prot'ed types. |
| 36 | |
| 37 | - `Binable.S_only_functions` |
| 38 | |
| 39 | - Fix various bin_prot issue in 32bit architectures |
| 40 | |
| 41 | ## 113.24.00 |
| 42 | |
| 43 | - Bin\_prot can be configured to use the primitives to read/write |
| 44 | integers from bigarrays. This was never enabled due to missing tests |
| 45 | that selecting this code path doesn't change the format. |
| 46 | |
| 47 | This version add these tests and enable the use of the fast |
| 48 | primitives. |
| 49 | |
| 50 | - Add benchmarks for all exposed bin\_prot read/write functions. |
| 51 | These are intended to check performance regressions. |
| 52 | |
| 53 | - Remove most use of cpp in bin\_prot. |
| 54 | |
| 55 | Replace the pre-processor conditionals by runtime one. This make the |
| 56 | code a little less obfuscated. |
| 57 | |
| 58 | - Remove big literals so that the compiler does not complain in 32bit |
| 59 | |
| 60 | ## 113.00.00 |
| 61 | |
| 62 | - Switched build to use =config.h= rather than the command-line for |
| 63 | preprocessor variables. |
| 64 | |
| 65 | - Switched from `ARCH_SIXTYFOUR` to `JSC_ARCH_SIXTYFOUR`. |
| 66 | |
| 67 | - Fixed to support 32-bit integers, which are used in `js_of_ocaml`. |
| 68 | |
| 69 | Do not make too many assumptions on integer size. |
| 70 | Integers are 32bit in Javascript. |
| 71 | |
| 72 | Do not use the "get_float_offset" hack on 32bit |
| 73 | as it cannot be implemented in javascript. |
| 74 | |
| 75 | ## 112.35.00 |
| 76 | |
| 77 | - Sped up `bin_io` of `float array`. |
| 78 | |
| 79 | `Bin_prot` already had special fast handling for `float array`'s but |
| 80 | `with bin_io` did not use it except for the special type |
| 81 | `float_array`. Now, there is fast handling for `float array` and |
| 82 | its aliases, for example `price array` when `type price = float`. |
| 83 | |
| 84 | - Changed `Size.bin_size_array`, `Write.bin_write_array` and |
| 85 | `Read.bin_read_array` short circuit to the fast path when it detects |
| 86 | that `float array` is handled. Each of these functions receives |
| 87 | a function for handling array elements and short circuits when the |
| 88 | function for handling elements is equal to the function for handling |
| 89 | floats, using physical equality of closures. |
| 90 | |
| 91 | - To cause short circuiting for aliases of `float`, changed `bin_io` |
| 92 | so that aliased `bin_io` functions are equal the the `bin_io` |
| 93 | functions of the original type. That is an optimization for itself |
| 94 | regardless whether it's used for `float`. Before this change, every |
| 95 | function generated for aliases were eta-expanded leading to |
| 96 | different closures at runtime for each type. |
| 97 | |
| 98 | Short circuiting needs to apply to the handling function rather than |
| 99 | to the value at hand because: |
| 100 | |
| 101 | * the value is available only in `size` and `write`, and we need |
| 102 | a way to make `read` work as well. |
| 103 | |
| 104 | * even when the value is a float at runtime, the handling of |
| 105 | a specific float alias may have been overridden by a custom one. |
| 106 | |
| 107 | Made a slight improvement to `bin_read_float_array`: since the array |
| 108 | is going to be filled with read values, there is no need to fill it |
| 109 | with `0.` after allocation: |
| 110 | |
| 111 | let next = pos + size in |
| 112 | check_next buf next; |
| 113 | -| let arr = Array.create len 0. in |
| 114 | +| let arr = Array.make_float len in |
| 115 | unsafe_blit_buf_float_array buf arr ~src_pos:pos ~dst_pos:0 ~len; |
| 116 | pos_ref := next; |
| 117 | |
| 118 | The difference in speed when optimal and non optimal way of handling |
| 119 | floats is used: |
| 120 | |
| 121 | | Name | Time/Run | mWd/Run | mjWd/Run | |
| 122 | |--------------------------------------------|-------------|-----------|----------| |
| 123 | | [bench.ml:float array] size non optimal | 3_403.80ns | 2_000.00w | | |
| 124 | | [bench.ml:float array] size float_array | 5.55ns | | | |
| 125 | | [bench.ml:float array] size Price.t array | 6.18ns | | | |
| 126 | | [bench.ml:float array] write non optimal | 7_839.89ns | 2_000.00w | | |
| 127 | | [bench.ml:float array] write float_array | 292.42ns | | | |
| 128 | | [bench.ml:float array] write Price.t array | 293.16ns | | | |
| 129 | | [bench.ml:float array] read non optimal | 9_665.06ns | 2_002.00w | 1.00kw | |
| 130 | | [bench.ml:float array] read float_array | 461.01ns | 2.00w | 1.00kw | |
| 131 | | [bench.ml:float array] read Price.t array | 449.43ns | 2.00w | 1.00kw | |
| 132 | |
| 133 | There is no observed speed penalty for runtime check for short |
| 134 | circuiting. The following benchmark shows the speed of handling |
| 135 | `int array` without and with the check: |
| 136 | |
| 137 | | Name | Time/Run | mWd/Run | mjWd/Run | |
| 138 | |--------------------------------------------|-------------|-----------|----------| |
| 139 | | [bench.ml:float array] int array size | 3_910.64ns | | | |
| 140 | | [bench.ml:float array] int array write | 6_548.40ns | | | |
| 141 | | [bench.ml:float array] int array read | 14_928.11ns | 2.00w | 1.00kw | |
| 142 | |
| 143 | | Name | Time/Run | mWd/Run | mjWd/Run | |
| 144 | |--------------------------------------------|-------------|-----------|----------| |
| 145 | | [bench.ml:float array] int array size | 3_906.86ns | | | |
| 146 | | [bench.ml:float array] int array write | 5_874.63ns | | | |
| 147 | | [bench.ml:float array] int array read | 14_225.06ns | 2.00w | 1.00kw | |
| 148 | |
| 149 | ## 112.24.00 |
| 150 | |
| 151 | Minor commit: comments. |
| 152 | |
| 153 | ## 112.17.00 |
| 154 | |
| 155 | - Added `Bin_prot.Blob`, formerly known as `Core_extended.Wrapped`, |
| 156 | which has efficient handling of size-prefixed bin-io values in cases |
| 157 | where serialization can be bypassed. |
| 158 | |
| 159 | ## 112.06.00 |
| 160 | |
| 161 | - Sped up `float` and `float array` operations. |
| 162 | - Removed a use of `Obj.magic` in code generated by `pa_bin_prot` for |
| 163 | polymorphic variants that led to memory unsafety. |
| 164 | |
| 165 | Previously, `pa_bin_prot` generated this kind of code for |
| 166 | polymorphic variants: |
| 167 | |
| 168 | match Obj.magic (read_int buf pos) with |
| 169 | | `A as x -> x |
| 170 | | `B as x -> x |
| 171 | | `C -> `C (read_float buf pos) |
| 172 | | _ -> fail |
| 173 | |
| 174 | and this caused the compiler to assume the result is an immediate |
| 175 | value. To fix this we removed the `as x -> x` and used the computed |
| 176 | integer hash. |
| 177 | |
| 178 | ## 112.01.00 |
| 179 | |
| 180 | - In `Write`, improved some OCaml macros to name values and avoid |
| 181 | calling C functions multiple times. |
| 182 | |
| 183 | ## 111.03.00 |
| 184 | |
| 185 | - Fixed build on ARM. |
| 186 | |
| 187 | ## 109.53.00 |
| 188 | |
| 189 | - Bump version number |
| 190 | |
| 191 | ## 109.47.00 |
| 192 | |
| 193 | - Compilation fix for 32-bit systems |
| 194 | |
| 195 | ## 109.44.00 |
| 196 | |
| 197 | - Remove "unwrapped" pointers used by `Bin_prot`, with the bug from |
| 198 | 109.41 fixed. |
| 199 | |
| 200 | Unwrapped pointers cannot coexist with the remove-page-table |
| 201 | optimization. |
| 202 | |
| 203 | Removed all the C stubs for reading/writing and used instead either |
| 204 | the new primitives of the next OCaml or standard OCaml code |
| 205 | reading/writing integers byte by byte. |
| 206 | |
| 207 | Since we don't have unsafe/safe functions anymore but only safe |
| 208 | ones, removed all the `bin_{read,write}_t_` functions. |
| 209 | |
| 210 | Also renamed `bin_read_t__` to `__bin_read_t__` for the same reason |
| 211 | as sexplib: to avoid confusion with the function generated for `t_` |
| 212 | and hide it in the toplevel. |
| 213 | |
| 214 | ## 109.42.00 |
| 215 | |
| 216 | - Backed out the changes introduced in 109.41 |
| 217 | |
| 218 | ## 109.41.00 |
| 219 | |
| 220 | - Remove all uses of "unwrapped" pointers |
| 221 | |
| 222 | Unwrapped pointers cannot coexist with the remove-page-table |
| 223 | optimization. |
| 224 | |
| 225 | Removed all the C stubs for reading/writing and used instead either |
| 226 | the new primitives of the next OCaml or standard OCaml code |
| 227 | reading/writing integers byte by byte. |
| 228 | |
| 229 | Since we don't have unsafe/safe functions anymore but only safe ones, |
| 230 | removed all the `bin_{read,write}_t_` functions. |
| 231 | |
| 232 | Also renamed `bin_read_t__` to `__bin_read_t__` for the same reason as |
| 233 | sexplib: to avoid confusion with the function generated for `t_` and |
| 234 | hide it in the toplevel. |
| 235 | |
| 236 | ## 109.10.00 |
| 237 | |
| 238 | - Improved error messages in presence of GADTs. |
| 239 | |
| 240 | ## 2012-07-15 |
| 241 | |
| 242 | - Rewrote README in Markdown and improved documentation. |
| 243 | - Eliminated new warnings available in OCaml 4.00. |
| 244 | |
| 245 | ## 2012-02-28 |
| 246 | |
| 247 | - Improved portability by better supporting the C99-standard and |
| 248 | non-GNU compilers. |
| 249 | |
| 250 | ## 2011-11-10 |
| 251 | |
| 252 | - Improved portability to older glibc distributions. |
| 253 | |
| 254 | ## 2011-09-15 |
| 255 | |
| 256 | - Fixes to improve package dependency resolution. |
| 257 | |
| 258 | ## 2011-07-04 |
| 259 | |
| 260 | - Internal updates to sync with Jane Street. |
| 261 | |
| 262 | ## 2011-06-29 |
| 263 | |
| 264 | - Fixed bigstring layout bug, which should only affect value |
| 265 | comparisons with OCaml 3.12.1 or later. |
| 266 | - Made 64-bit detection more reliable on Mac OS X. |
| 267 | |
| 268 | ## 2010-03-20 |
| 269 | |
| 270 | - Fixed linking of toplevels to require bigarrays. |
| 271 | - Improved compilation on Mac OS X. |
| 272 | |
| 273 | ## 2010-03-17 |
| 274 | |
| 275 | - Fixed small name capture bug. |
| 276 | |
| 277 | ## 2009-12-21 |
| 278 | |
| 279 | - Updated contact information. |
| 280 | |
| 281 | ## 2009-09-19 |
| 282 | |
| 283 | - Added missing type cases for supporting variant types. |
| 284 | - Fixed handling of variance annotations. |
| 285 | |
| 286 | ## 2009-07-27 |
| 287 | |
| 288 | - Fixed build problem with gcc 4.4 due to stricter checking |
| 289 | for empty macro arguments. |
| 290 | |
| 291 | Thanks to Nobuyuki Tomiza <[email protected]> |
| 292 | for the patch! |
| 293 | |
| 294 | ## 2009-07-20 |
| 295 | |
| 296 | - Merged tiny Jane Street improvements. |
| 297 | |
| 298 | ## 2009-07-03 |
| 299 | |
| 300 | - Made byte swapping more portable. |
| 301 | |
| 302 | ## 2009-07-02 |
| 303 | |
| 304 | - Added support for network byte order integers. |
| 305 | |
| 306 | ## 2009-04-22 |
| 307 | |
| 308 | - Added macro support for all kinds of vectors (vec, |
| 309 | float32_vec, float64_vec) and matrices (mat, float32_mat, |
| 310 | float64_mat), and for bigstrings (bigstring). |
| 311 | |
| 312 | ## 2009-04-16 |
| 313 | |
| 314 | - Fixed a bug leading to an exception when writing |
| 315 | extremely large values (>4 GB buffer size). Does not cause |
| 316 | data corruption. |
| 317 |