Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/bcb561351af6ad4daa610e0374ab9314 to your computer and use it in GitHub Desktop.
Save trycf/bcb561351af6ad4daa610e0374ab9314 to your computer and use it in GitHub Desktop.
TryCF Gist
<cfscript>
arr = []
cfloop( from="1", to="2100000", index="i" ) {
arr.append(1);
}
writedump( arr.len() )
start = getTickCount()
arr.slice( 1000000, 100 ).len()
writedump( getTickCount()-start & 'ms' )
start = getTickCount()
arr.subList( 1000000, 1000100 ).len()
writedump( getTickCount()-start & 'ms' )
</cfscript>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment