Forum Discussion
Simple Guide On Effective Use Of Parallel Programming For C# In A Managed Code Environment:
Example script that utilizes concepts from the above post, and runs on a single core in a managed code environment, which emphasizes type safety:
Use Notepad to create this file on your desktop or another folder: https://sourceforge.net/projects/openscriptlab/files/Batch_PowerShell/Generic_Cryptographically_Secure_Password_Generator.bat/download
NOTE: This is an example batch file, that uses PowerShell 5.1 with C# style syntax and .NET APIs, without using pointers, or direct / indirect addressing, yet still having low level access to each byte value, to create a virtual flag register, by utilizing the equivalent of a unary cast operator, right shift, left shift, and logical exclusive or, as a byte mask. By itself, this one of the most most efficient ways to sort reference types, only using unsigned integers ( byte values, ) and either a hash table or a byte array, used as an index to cross translate when it comes time to display the text on the screen, with the reference types stored in another array, along with the index being in the form of a byte array, that points to said array of reference types, which in contrast, are represented as a series of Unicode character values ( UTF-16. ) This is similar to how you're supposed to handle reference types, without recasting a reference type over and over again, which is very inefficient, or only recasting WHEN you need to display it on the screen. The syntax differs slightly from the C# version, given it's also an interpreted language that runs on the equivalent of a virtual machine. If you were to use this in C# it would be very fast, and you would not have to worry as much about type safety in a manged code environment. The whole purpose of this is achieve the same outcome without pointers, in a managed code environment, and not lose the performance gains associated with using C Language.