By switching the lists I was using as stacks out with a deque, I appear to have achieved a teeeensy speed improvement. List `append()` and `pop()` methods have at most a O(n) time complexity, where deques have a O(1) time complexity. https://docs.python.org/3/library/collections.html#collections.deque Signed-off-by: AKU <tom@tdpain.net>
15 lines
No EOL
382 B
JSON
15 lines
No EOL
382 B
JSON
{
|
|
"day": 10,
|
|
"dir": "challenges/2021/10-syntaxScoring",
|
|
"implementations": {
|
|
"Python": {
|
|
"part.1.avg": 0.001248321533203125,
|
|
"part.1.max": 0.004151821136474609,
|
|
"part.1.min": 0.0008554458618164062,
|
|
"part.2.avg": 0.0030763609409332274,
|
|
"part.2.max": 0.028047800064086914,
|
|
"part.2.min": 0.002079486846923828
|
|
}
|
|
},
|
|
"numRuns": 1000
|
|
} |