Dynamic linking library more optimized?

What is more vs optimized? Using a c# dll or just sticking everything in unity without a namespace?

I'm unclear on what you mean by "vs optimized". Do you mean code performance, or Visual Studio ease of use?

On performance, the very short version is that even if you add your C# code as scripts, Unity will end up building it to a DLL. At the end of the day, it'll be the same.

Regarding Visual Studio usability, there will be no difference other than you obviously can't edit the precompiled DLL, but as long as there's a reference to it, you'll still get autocomplete and compilation working without a problem.

Regarding performance, there is simply no difference at all.

Regarding workflow: It very much depends on your project size and how much code you want to reuse. It may be helpful to have several Visual Studio projects that go into several DLLs, using namespaces etc.; if you have very large projects and a lot of code you want to reuse. For smaller projects, this kind of overhead won't make sense.

If you're on the iPhone, you can only have a limited amount of DLLs, so for that plattform, you should definitely keep as much as possible in the Unity project and avoid using your own DLLs.

scripting is a powerful tool for many tasks and it has many advantages: it is platform independent and you don't need to write different codes for different platforms. it's easier than coding in unmanaged languages like C++ but it's slower. .NET/MONO code is too fast and you don't need to use other languages in most cases but if you have algorithms that they are complex and they need to run many times it's a good idea to write them in C++ and then call them from unity. AI and path finding are good examples. there are also other situations that you need special features of a specific platform or you need to communicate with a special hardware and in those situations you need to write C++ or C code too.