You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ab8309d
Browse filesBrowse the repository at this point in the historyBrowse files
* Fixed converting a weak map to another value type losing live keys, about one in five in a map whose keys had mostly died: a collection during the conversion folded the map's buckets (#204), moving entries into buckets the conversion had already passed. A collection now leaves the fold to a later one while anything walks the map, which keys(), values(), toString and conversion do (libhxcpp #204)
6
+
* Fixed the moving collector (HXCPP_GC_MOVING) giving the whole heap back on Gc.run(true) and whenever the allocator's free list filled, as the other modes stopped doing in #230 and #231: a heap with a small live set stayed near 9 MB and collected far more often, and Gc.run(true) shrank it to 1 MB. Only Gc.compact() releases everything now; the collector still moves objects on those collections (libhxcpp #231)
7
+
* Sped up converting a Float to a String, which rounded it with printf to 15, 16 and 17 digits and read each back with strtod to find the shortest digits that read back. Grisu3 finds them with integer arithmetic, and the old search does the doubles it cannot decide, about 0.5% in Loitsch's measurements. The text is the same for every value: Std.string on Floats went from 996k to 8.8M conversions a second (libhxcpp #390)
8
+
* Fixed a thread whose cpp.Lib.load was failing crashing the process at exit on Windows, about once in a hundred exits: a failing load reads haxelib's files to look further, and exit frees the C runtime's table of open files while other threads still run. The loader reads them with Win32 calls instead (libhxcpp #371)
9
+
* Fixed Gc.trace with path printing overflowing the native stack on a deep graph, as it marked by recursing all the way down: it now recurses 256 objects deep, and paths below that start with "... + higher". It also counts instances that are large allocations and instances with no object fields, which it missed, and prints paths through large objects from their root (libhxcpp #389)
10
+
* Fixed val_buffer losing the text of a value after a NUL character: it measured the UTF-8 text with strlen. It now appends the text's full byte count (libhxcpp #393)
11
+
* Fixed Date's local fields keeping the previous time zone after the zone changed: the last time converted is cached per thread, and the cache was keyed by the time alone, so a date read before the change read the old zone until another time was converted. The cache now also keys on the zone the C library has, and Sys.putEnv("TZ") applies the new zone at once, where localtime_r and the Windows CRT had kept the old one until something called tzset (libhxcpp #392)
12
+
* Fixed cpp.NativeFile.file_open with an exclusive-create mode such as "wbx" truncating a file that exists on Linux, macOS and other POSIX systems: files are opened with open(2) to make them close-on-exec, and the mode was mapped without O_EXCL. Such a mode now fails on a file that exists and leaves it as it was, and x without w fails too (libhxcpp #391)
5
13
* Sped up byte-wise reads from TCP sockets, such as Socket.input.readLine and readUntil, which called recv for every byte, in a GC-free zone of its own. Reading one byte now takes what else the kernel already holds, up to 4 KB, and every other read, select, fast select, both Poll calls and TLS take those bytes first, so blocking, timeouts, nonblocking reads, end of stream, shutdown and reads from several threads behave as they did. Reading 128 KiB of 128-byte lines with readLine went from 78 ms to 2.0 ms; through a 16 KiB BufferInput it takes 0.8 ms (libhxcpp #338)
6
14
* cpp.net.Poll keeps its registrations in the kernel, with epoll on Linux and Android and kqueue on macOS, iOS and the BSDs, so an events call costs what is ready instead of every socket registered: poll() looked at all of them on every call, 0.3 ms a call for 4,096 idle sockets on Linux. prepare tells the kernel only what changed since the last one, and the results are as before, including a socket closed after prepare reported as ready to read and write. Where the kernel will not make a queue, and on Emscripten, Poll uses poll() as before. Windows keeps select, which WSAPoll did not beat: at 1,024 idle sockets it took 0.12 ms a call and WSAPoll 0.71 ms (libhxcpp #320)
7
15
* Sorting an array of Ints, Floats or other plain values with a comparator no longer holds a box for every element for the whole sort. An array past 16,384 elements sorts runs of that size, each through boxes as before, and merges them, boxing each value as the merge reaches it, so the boxes alive at once are those of one run. Sorting 200,000 Ints (sort_int) peaks at 29.6 MB instead of 32.4 MB (stock hxcpp 4.3.53: 28.2 MB) and runs 1.19x faster (libhxcpp #256)
0 commit comments