day18, example second parallel

This commit is contained in:
efim
2023-12-18 20:33:04 +00:00
parent 568fdd9a70
commit 6efd55ae6a
2 changed files with 126 additions and 79 deletions

View File

@@ -34,3 +34,18 @@ day18 result: 952408144115
952408144115
*** YES.
*** about 1M for 4 minutes
** so, my input is ~16M rows
3.5 seconds per 10k
** well, maybe i can parallel.
*** parallel example
day18 result: 952407566854
*** and with separate done channel from the summing goroutine
952408144115
**** YES
** and
2023/12/18 23:35:31 border is 195341588; inside is 148441957805559
2023/12/18 23:35:31
day18 result: 148442153147147
* i should have used a formula. maybe then it would taken less than 4 hours