DateTime.Parse is slow #60206
Labels
area-vm
Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
library-core
os-windows
type-performance
Issue relates to performance or code size
Hi there,
The following little code block:
var stringToParse = "2026-01-02"; var watch = Stopwatch()..start(); for(int i=0;i<1_000_000;i++){ DateTime.parse(stringToParse); }
Takes a whopping 15-16 seconds to complete. My machine is an i7 dev workstation. It's running on a background isolate, if that matters.
Let me know if i'm comparing apples to oranges here, but that same piece of code in C# takes 200ms. Anything I can do to parse a large number of DateTime values, in a reasonable amount of time ?
The text was updated successfully, but these errors were encountered: