Skip to content

v0.7.3

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Nov 02:15

This release changes how a delayed response is sent. It also reorganizes the documents around value orientation. The rules of the language have not changed.

std

  • std/http/server: a response from http.server.Delayed(ms, r) is now sent directly by the runtime when its delay expires. Before, the expiry woke the task and the task sent the response. On the local benchmark (async, 24,000 connections), user-side cycles per request dropped by 46% and p99 went from 141 ms to 73 ms. The lower bound of the delay (never sent earlier than ms) is unchanged
  • With the change above, the order of sends under saturation changes. Before, the most recently expired response was sent first. Now responses are sent in the order they expire. The median is slightly later and the slow tail is shorter
  • std/http/server: the method, path and query of a request are cut at the positions of their ASCII delimiters. Before, each cut ran a UTF-8 check
  • std/convert: formatting an integer as decimal text is faster. ParseInt gained a fast path for 18 digits or fewer

Compiler

  • A large immutable value is passed to a parameter as a one-word address. This applies to immutable structs, unions and T? over 8 words that do not contain a map. Before, the value was copied. The meaning of a program does not change
  • The wording of the const parameter diagnostic was fixed ("is a const seat" → "is a const parameter")

Documents

  • Added a document on value orientation (docs/value-oriented.md; Japanese: docs/value-oriented.ja.md). It explains the idea at the center of Sober in one piece
  • The opening of the README now explains value orientation. The pillars section was reorganized into "Properties derived from value orientation" and "Four pillars"
  • The wording of language rule F-16 was fixed. The lambdas that cannot capture a mut binding are the ones that are not inlined (a lambda in a value position, and a lambda passed as a borrowed argument of a value call). A lambda inlined at its call site can capture one. The implementation already worked this way; the text had not kept up
  • Fixed descriptions that had gone stale: the paths a recursive type declaration may go through (including the contents of T? and function types), SQL injection (with std/pg the SQL text must be a const, so it cannot be written), the shape of std/pool (it returns no reference and copies values), and the list of environment variables the runtime reads
  • The data race section of the security guide now explains domains
  • In the Japanese standard library reference and CLI document, two headings were renamed to the settled terms

Measurements

Requests per second against v0.7.2, on a setup close to the official HttpArena one (EC2 c6a.metal, 64 server workers; median of 6 rounds):

Test vs v0.7.2
async (32,000 connections) +10.7%
baseline (4,096 connections) +1.8%
limited-conn +1.4%
json-comp −1.2%

For the fixed-rate latency tests (latency-10k, latency-1m, 8gbit), p99 and mean are unchanged within the round-to-round spread. The cause of the small drop in json-comp is under investigation.