Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Programming language comparison by reimplementing the same transit data app. Parent comment
- enable source generation for JSON serialization
https://learn.microsoft.com/en-us/dotnet/standard/serializat...
- use `TryGetValue` to do single dictionary lookup instead of two.
if (TripsIxByRoute.TryGetValue(route, out var tripIxs))
var schedules = new List<StopTimeResponse>(stopTimeIxs.Count);
There are no comments on this comment yet.
- enable source generation for JSON serialization
https://learn.microsoft.com/en-us/dotnet/standard/serializat...
- use `TryGetValue` to do single dictionary lookup instead of two.
- specify List's capacity, if it's known when creating it, to avoid resizing operations while adding elements to the List