Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>How much slower is using regex's to substr.</strong><br> If you are looking for an exact string, substr will be faster. Regular expressions however are highly optimized. They (or at least parts) are compiled to IL and you can even store these compiled versions in a separate assembly using <code>Regex.CompileToAssembly</code>. See <a href="http://msdn.microsoft.com/en-us/library/9ek5zak6.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/9ek5zak6.aspx</a> for more information.</p> <p>What you really need to do is do perform measurements. Using something like <code>Stopwatch</code> is by far the easiest way to verify whether one or the other code construct works faster.</p> <p><strong>What sort of optimizations (if any) can I do to maximize parallelism.</strong><br> With <code>Task.Factory.StartNew</code>, you can schedule tasks to run on the thread pool. You may also have a look at the TPL (Task Parallel Library, of which <code>Task</code> is a part). This has lots of constructs that help you parallelize work and allows constructs like <code>Parallel.ForEach()</code> to execute an iteration on multiple threads. See <a href="http://msdn.microsoft.com/en-us/library/dd460717.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/dd460717.aspx</a> for more information.</p> <p><strong>Anything else I haven't considered?</strong><br> One of the things that will hurt you with this volume of data is memory management. A few things to take into account:</p> <ul> <li><p>Limit memory allocation: try to re-use the same buffers for a single document instead of copying them when you only need a part. Say you need to work on a range starting at char 1000 to 2000, don't copy that range into a new buffer, but construct your code to work only in that range. This will make your code complexer, but it saves you memory allocations;</p></li> <li><p><code>StringBuilder</code> is an important class. If you don't know of it yet, have a look.</p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload