The past weekend I read about an interesting pull request which is bringing a new type of dictionary with great interest. The idea of creating a new, simpler and enhanced version , now called DictionarySlim, original spun from the famous k-nucleotide benchmark where .NET had some trouble performing well with the built-in Dictionary . What is this new member in *Slim family?
I'm probably going to break all the rules of OO encapsulation and some SOLID principles here. Be warned. We all have had our share of the strategy pattern, abstract factory, you name it. Abstracting targets behind interfaces and abstract base classes. They all are fine and aim to produce better software and they usually do. But when it comes to performance, you should sometime bend the rules a bit.
Just adding a quick note for myself here. I wanted to run against docker host on WSL2 and docker compose connects to DockerDesktopVM instance by default (the full virtual machine). What I wanted to try is to run Docker Compose experience without the virtual machine utilizing the new WSL2 capabilities. Scott Hanselman has a good write-up about this feature. Prequisities Windows 10 insider build from the fast ring (at the time of writing), build 18932 or newer Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform Install Ubuntu 18.04 from Windows Store, ensure it has the correct WSL version wsl --set-version Ubuntu-18.04 2 To make life easier, make the new version default wsl --set-default-version 2 Install Docker Desktop WSL 2 Technical Preview Run docker-compose targeting the Linux WSL2 docker host The key is to use the -H parameter, when you are hosting both the Virtual Machine and lightweight WSL2 version. docker-compose -H "npipe:/
Post a Comment