rbhkamal Posted February 13, 2007 Posted February 13, 2007 Hi, 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 Do $a_s_lines[$count] = $count $count += 1 ReDim $a_s_lines[$count+1] Until ($count == $total) ConsoleWrite( "count: "&$count&@LF&"time: "&TimerDiff($timer)&@LF) #cs count: 12000 time: 83719.0114944777 #ce 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. Regards, RK "When the power of love overcomes the love of power, the world will know peace"-Jimi Hendrix
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now