Jump to content
Sign in to follow this  

Need preformace boost for ReDim.

Recommended Posts


I'm writing a script that parses multiple registry export files to an array and then writes out the common keys and values. and I noticed that where ever I use ReDim the performance drops down dramatically.

Here is a script that shows how slow ReDim is:

$total = 12000
;Dim $a_s_lines[$total + 1] = [0]
Dim $a_s_lines[0 + 1]      = [0]

$timer = TimerInit()
$count = 0
    $a_s_lines[$count] = $count
    $count += 1
    ReDim $a_s_lines[$count+1]
Until ($count == $total)

ConsoleWrite( "count: "&$count&@LF&"time: "&TimerDiff($timer)&@LF)

count: 12000
time: 83719.0114944777

I found a way around the slow performance but I just thought ReDim is a bit too slow and probably someone needs to look at it.



"When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...