My cleaned one:
-------------------------------------------------------------------------------------------
use AppleScript version "2.4"
use framework "Foundation"
use scripting additions
on cleanList:theList
set theArray to current application's NSMutableArray's arrayWithArray:theList
set unionOfArrays to (theArray's valueForKeyPath:"@unionOfArrays.self")
return unionOfArrays as list
end cleanList:
set startDate to current application's NSDate's |date|()
repeat 1000 times
tell application "Contacts"
tell group "Famille"
set phoneNumList to value of every phone of every person
end tell
end tell
set phoneNumList to its cleanList:phoneNumList
end repeat
set timeDiff to startDate's timeIntervalSinceNow()
display dialog "That took " & (-timeDiff as real) & " seconds."
--> "That took 8,027648031712 seconds."
-------------------------------------------------------------------------------------------