<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glibc/benchtests, branch master</title>
<subtitle>Fork of glibc for development</subtitle>
<id>https://git.zx2c4.com/glibc/atom/benchtests?h=master</id>
<link rel='self' href='https://git.zx2c4.com/glibc/atom/benchtests?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/'/>
<updated>2024-06-21T13:41:42Z</updated>
<entry>
<title>Benchtests: Remove broken walk benchmarks</title>
<updated>2024-06-21T13:41:42Z</updated>
<author>
<name>Wilco Dijkstra</name>
<email>wilco.dijkstra@arm.com</email>
</author>
<published>2024-06-20T10:43:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=5aa2f79691ca6a40a59dfd4a2d6f7baff6917eb7'/>
<id>urn:sha1:5aa2f79691ca6a40a59dfd4a2d6f7baff6917eb7</id>
<content type='text'>
The walk benchmarks don't measure anything useful - memory is not initialized
properly so doing a single walk in 32MB just measures reading the 4KB zero
page for reads and clear_page overhead for writes.  The memset variants don't
even manage to do a walk in the 32MB region due to using incorrect pointer
increments...  Neither is it clear why it is walking backwards since this
won't confuse modern prefetchers.  If you fix the benchmark and print the
bandwidth, the results are identical for all sizes larger than ~1KB since it
is just testing memory bandwidth of a single 32MB block.  This case is already
tested by the large benchmark, so overall it doesn't seem useful to keep these.

Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>Modernize and fix doc’s “Date and Time” (BZ 31876)</title>
<updated>2024-06-15T15:53:50Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-06-08T16:48:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=ee768a30fe9099972dad04c49972c2508a208b9b'/>
<id>urn:sha1:ee768a30fe9099972dad04c49972c2508a208b9b</id>
<content type='text'>
POSIX.1-2024 (now official) specifies tm_gmtoff and tm_zone.
This is a good time to update the manual’s “Date and Time”
chapter so I went through it, fixed some outdated
stuff that had been in there for decades, and improved it to match
POSIX.1-2024 better and to clarify some implementation-defined
behavior.  Glibc already conforms to POSIX.1-2024 in these matters, so
this is merely a documentation change.

* manual/examples/strftim.c: Use snprintf instead of now-deprecated
  function asctime.  Check for localtime failure.  Simplify by using
  puts instead of fputs.  Prefer ‘buf, sizeof buf’ to less-obvious
  ‘buffer, SIZE’.

* manual/examples/timespec_subtract.c: Modernize to use struct
  timespec not struct timeval, and rename from timeval_subtract.c.
  All uses changed.  Check for overflow.  Do not check for negative
  return value, which ought to be OK since negative time_t is OK.
  Use GNU indenting style.

* manual/time.texi:

  Document CLOCKS_PER_SEC, TIME_UTC, timespec_get, timespec_getres,
  strftime_l.

  Document the storage lifetime of tm_zone and of tzname.

  Caution against use of tzname, timezone and daylight, saying that
  these variables have unspecified values when TZ is geographic.
  This is what glibc actually does (contrary to what the manual said
  before this patch), and POSIX is planned to say the same thing
  &lt;https://austingroupbugs.net/view.php?id=1816&gt;.
  Also say that directly accessing the variables is not thread-safe.

  Say that localtime_r and ctime_r don’t necessarily set time zone
  state.  Similarly, in the tzset documentation, say that it is called
  by ctime, localtime, mktime, strftime, not that it is called by all
  time conversion functions that depend on the time zone.

  Say that tm_isdst is useful mostly just for mktime, and that
  other uses should prefer tm_gmtoff and tm_zone instead.

  Do not say that strftime ignores tm_gmtoff and tm_zone, because
  it doesn’t do that.

  Document what gmtime does to tm_gmtoff and tm_zone.

  Say that the asctime, asctime_r, ctime, and ctime_r are now deprecated
  and/or obsolescent, and that behavior is undefined if the year is &lt;
  1000 or &gt; 9999.  Document strftime before these now-obsolescent
  functions, so that readers see the useful function first.

  Coin the terms “geographical format” and “proleptic format” for the
  two main formats of TZ settings, to simplify exposition.  Use this
  wording consistently.

  Update top-level proleptic syntax to match POSIX.1-2024, which glibc
  already implements.  Document the angle-bracket quoted forms of time
  zone abbreviations in proleptic TZ.  Say that time zone abbreviations
  can contain only ASCII alphanumerics, ‘+’, and ‘-’.

  Document what happens if the proleptic form specifies a DST
  abbreviation and offset but omits the rules.  POSIX says this is
  implementation-defined so we need to document it.  Although this
  documentation mentions ‘posixrules’ tersely, we need to rethink
  ‘posixrules’ since I think it stops working after 2038.

  Clarify wording about TZ settings beginning with ‘;’.

  Say that timegm is in ISO C (as of C23).

  Say that POSIX.1-2024 removed gettimeofday.

  Say that tm_gmtoff and tm_zone are extensions to ISO C, which is
  clearer than saying they are invisible in a struct ISO C enviroment,
  and gives us more wiggle room if we want to make them visible in
  strict ISO C, something that ISO C allows.

  Drop mention of old standards like POSIX.1c and POSIX.2-1992 in the
  text when the history is so old that it’s no longer useful in a
  general-purpose manual.

  Define Coordinated Universal Time (UTC), time zone, time zone ruleset,
  and POSIX Epoch, and use these phrases more consistently.

  Improve TZ examples to show more variety, and to reflect current
  practice and timestamps.  Remove obsolete example about Argentina.
  Add an example for Ireland.

  Don’t rely on GCC extensions when explaining ctime_r.

  Do not say that difftime produces the mathematically correct result,
  since it might be inexact.

  For clock_t don’t say “as in the example above” when there is no
  such example, and don’t say that casting to double works “properly
  and consistently no matter what”, as it suffers from rounding and
  overflow.

  Don’t say broken-down time is not useful for calculations; it’s
  merely painful.

  Say that UTC is not defined before 1960.

  Rename Time Zone Functions to Time Zone State.  All uses changed.

  Update Internet RFC 822 → 5322, 1305 → 5905.  Drop specific years of
  ISO 8601 as they don’t matter.

  Minor style changes: @code{"..."} → @t{"..."} to avoid overquoting in
  info files, @code → @env for environment variables, Daylight Saving
  Time → daylight saving time, white space → whitespace, prime meridian
  → Prime Meridian.
</content>
</entry>
<entry>
<title>benchtests: Add fclose benchmark</title>
<updated>2024-05-16T15:12:59Z</updated>
<author>
<name>H.J. Lu</name>
<email>hjl.tools@gmail.com</email>
</author>
<published>2024-05-16T15:08:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=fa9aecc045e9e7d0c2f4e182748491f732e63dd2'/>
<id>urn:sha1:fa9aecc045e9e7d0c2f4e182748491f732e63dd2</id>
<content type='text'>
Measure duration of 100 fclose calls after opening 1 million FILEs.

Signed-off-by: H.J. Lu &lt;hjl.tools@gmail.com&gt;
Reviewed-by: Carlos O'Donell &lt;carlos@redhat.com&gt;
</content>
</entry>
<entry>
<title>benchtests: Add difficult strstr needle for bruteforce algorithms</title>
<updated>2024-04-24T17:25:46Z</updated>
<author>
<name>Wilco Dijkstra</name>
<email>wilco.dijkstra@arm.com</email>
</author>
<published>2024-04-24T17:24:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=f262fce61671c38d436d2d0cd68dab5642ac9ef0'/>
<id>urn:sha1:f262fce61671c38d436d2d0cd68dab5642ac9ef0</id>
<content type='text'>
Add another difficult needle to strstr that clearly shows the quadratic
complexity of bruteforce algorithms.

Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>benchtests: Add random() benchmark</title>
<updated>2024-04-18T13:30:21Z</updated>
<author>
<name>Wilco Dijkstra</name>
<email>wilco.dijkstra@arm.com</email>
</author>
<published>2023-11-28T13:33:56Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=0997c3d0c87433ac8c78043aaa9b6b7e91df2882'/>
<id>urn:sha1:0997c3d0c87433ac8c78043aaa9b6b7e91df2882</id>
<content type='text'>
Add a simple benchmark to measure the overhead of internal libc locks in
the random() implementation on both single- and multi-threaded cases.
This relies on the implementation of random using internal locks to
access shared global data, and that the runtime uses multi-threaded
locking once a thread has been created (even after it finishes).

Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>benchtests: Improve benchtests for strstr</title>
<updated>2024-04-01T16:52:00Z</updated>
<author>
<name>Adhemerval Zanella</name>
<email>adhemerval.zanella@linaro.org</email>
</author>
<published>2024-03-18T12:27:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=a0698a5e92ceeed3409d28623b1d599da6bc887d'/>
<id>urn:sha1:a0698a5e92ceeed3409d28623b1d599da6bc887d</id>
<content type='text'>
Use same strategy as bench-strstr.c (93eebae5168e5cf2 and 80b2bfb53504)
and use json_ctx for output to help standardize format across all
benchtests.
Reviewed-by: Arjun Shankar &lt;arjun@redhat.com&gt;
</content>
</entry>
<entry>
<title>benchtests: Add more benchtests for rounding functions.</title>
<updated>2024-02-23T11:50:00Z</updated>
<author>
<name>Junxian Zhu</name>
<email>zhujunxian@oss.cipunited.com</email>
</author>
<published>2024-01-22T02:16:19Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=0a4d6c825405bb0dd5058566b01f12704cfc3731'/>
<id>urn:sha1:0a4d6c825405bb0dd5058566b01f12704cfc3731</id>
<content type='text'>
This patch adds more benchtests for rounding functions.
The double inputs are copied from trunc-inputs, the float inputs are copied from truncf-inputs. and the rintf is copied from rint-inputs.
Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>Benchtests: Increase benchmark iterations</title>
<updated>2024-01-12T16:00:28Z</updated>
<author>
<name>Wilco Dijkstra</name>
<email>wilco.dijkstra@arm.com</email>
</author>
<published>2024-01-02T17:08:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=7c14d8a985416986256f68568313cdb36f559821'/>
<id>urn:sha1:7c14d8a985416986256f68568313cdb36f559821</id>
<content type='text'>
Increase benchmark iterations for math and vector math functions to improve
timing accuracy.  Vector math benchmarks now take 1-3 seconds on a modern CPU.

Reviewed-by: Adhemerval Zanella  &lt;adhemerval.zanella@linaro.org&gt;
</content>
</entry>
<entry>
<title>Update copyright dates with scripts/update-copyrights</title>
<updated>2024-01-01T18:53:40Z</updated>
<author>
<name>Paul Eggert</name>
<email>eggert@cs.ucla.edu</email>
</author>
<published>2024-01-01T18:12:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=dff8da6b3e89b986bb7f6b1ec18cf65d5972e307'/>
<id>urn:sha1:dff8da6b3e89b986bb7f6b1ec18cf65d5972e307</id>
<content type='text'>
</content>
</entry>
<entry>
<title>benchtests: fix warn unused result</title>
<updated>2023-06-22T04:21:19Z</updated>
<author>
<name>Frederic Berat</name>
<email>fberat@redhat.com</email>
</author>
<published>2023-06-20T18:19:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/glibc/commit/?id=99f9ae4ed0ba9f2c84520b78fd0eeed96a7ed40e'/>
<id>urn:sha1:99f9ae4ed0ba9f2c84520b78fd0eeed96a7ed40e</id>
<content type='text'>
Few tests needed to properly check for asprintf and system calls return
values with _FORTIFY_SOURCE enabled.

Reviewed-by: Siddhesh Poyarekar &lt;siddhesh@sourceware.org&gt;
</content>
</entry>
</feed>
