#820 closed Feature Request (Completed)
Speed enhancement to _FileListToArray
| Reported by: | Spiff59 | Owned by: | Gary |
|---|---|---|---|
| Milestone: | Future Release | Component: | Standard UDFs |
| Version: | Severity: | None | |
| Keywords: | Cc: |
Description
_FileListToArray is an often-used and time-consuming function.
Almost the entire processing time of the function is spent within a FileFindNextFile loop. Within the existing loop are two seperate compares testing the value of a passed parameter.
I propose inserting a Switch statement, which will drive three seperate While loops. This allows the removal of the two tests from the exisitng While loop.
The fucntionality of the routine remains identical, but adding one Switch statements prohibits the execution of potentially tens of thousands of unnecessary compares. The attached _FileListToArray consistantly ran about 13% faster on my machine, regardless of the size of the returned array.
Attachments (1)
Change History (4)
by , 17 years ago
comment:2 by , 17 years ago
| Resolution: | → Completed |
|---|---|
| Status: | new → closed |
#837 brought a division by 3

_FIleListToArray (new version)