100 Days of Code Day 79
Today’s exercise was Parallel Letter Frequency. Get the frequency of letters in a bunch of strings, but in Parallel. I thought I was good with a Parallel.ForEach but everyone else used a .AsParallel() LINQ query. I decided I was far enough off that I submitted a second version which was basically just a copy of someone else’s. I guess I am not good with LINQ, but I still think the Parallel for each was good enough. I did need to lock the final output object in order to not corrupt data in the original. I wonder which was faster (didn’t test).
Refactoring is underway. I think I have the for loop working in non-repl mode and as a single line in repl mode (next command in repl mode does a exception error, and a single for line just initializes the counter and stops after which the program is wiped because we are in repl mode). Not show, but you can nest the loops. IF is still pending. All statements should now be dumped into the program, then you run from the runtime.
