Skip to content

Conversation

@StephanTLavavej
Copy link
Member

  • Avoid emitting consecutive zeros.
    • Now that we've finished C++20, the cxx20 line is constantly zero. I want it to simply vanish, as the C++17 line did (which was manually recorded in weekly_table.js, so we just stopped recording data points). To do this in a general way, I'm splitting the daily table generation into two phases. First, we calculate all of the data points (this part takes a bit of time, so there's a progress bar). Then, we determine which data points should be kept - this requires looking at the previous and next values, so it has to be a separate phase. should_emit_data_point() will keep a value if it's nonzero (which we definitely need!), if the previous value exists and was nonzero (because when we fall to zero, we want to record a single zero before stopping), or if the next value exists and will be nonzero (to properly display liftoff from zero).
    • The optional chaining operator ?. makes this look very nice because the bounds checks are implicit. In rows[i - 1]?.[key] > 0, when i === 0, then rows[i - 1] will be undefined; the optional chaining operator will short-circuit instead of attempting to access the [key] (which would otherwise be an error) and return undefined. Then undefined > 0 is false, which is what we want - at the beginning of the dataset, there is no previous value to consider, so we'll consider only the current and next data point.
    • This also allows us to drop the hardcoded begin_cxx23.
  • npm update.
  • weekly_table.js: 2021-04-30 update.
  • Adjust PR Age max and stepSize.
  • Update usernames_contributors.txt.
  • chart.js 3.2.1.

📉 Live preview: stephantlavavej.github.io/STL/

Note: To avoid merge conflicts, this doesn't update daily_table.js, thus the effect of dropping zeros can't be seen yet. It affects the beginning of the bug line, and the end of the cxx20 line.

@StephanTLavavej StephanTLavavej added the documentation Related to documentation or comments label May 2, 2021
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner May 2, 2021 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Related to documentation or comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants