Dicitonary Object Performance

Results 1 to 2 of 2

Thread: Dicitonary Object Performance

  1. #1
    Thom D Guest

    Default Dicitonary Object Performance

    Are there any informative articles around about the performance hit or lack-of when using the dictionary object? I&#039m trying to find info for heavy use (20-30 keys).<BR><BR>thank you

  2. #2
    SPG Guest

    Default My Short Article

    Object performance (not just the dictionary) almost always goes something like this...<BR><BR>1) It is faster to use an intrinsic data type (like an array) than an intrinsic object (like a dictionary).<BR>2) It is faster to use an intrinsic object (like a dictionary) than to write your own (like a Widget).<BR><BR>Other pointers would include "Don&#039t use a dictionary for what could be just a whole lot of required variables" and "Don&#039t replace an array with a dictionary".<BR><BR>As far as I know (so this is completely unauthorative -- though it also applies to most collection-based objects), a dictionary is really just a cleverly disguised dynamic 2D array which will allow you to search for a key (1D) and get back a value for your efforts (2D). This design gives it more flexibility than most collections of variables or general arrays, but if you&#039re paying close attention, you won&#039t need that flexibility 80% of the time.<BR><BR>Oh, should mention that it&#039s probably better to use a dictionary than to redim an array multiple times...<BR><BR>HiH.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts