Never, ever use the result variable. It makes debugging a nightmare and makes code much harder to read.
tell application "Daylite"
set currentObjectName to eval "(selectedObjects lastObject) name."
end tell
tell application "Keyboard Maestro Engine"
setvariable "Current Object Name" to currentObjectName
end tell
No, there’s no way to optimize this code to make it run faster.
However — you can execute it a little faster by running it from a script-file instead of a text-script.
** Script files must be saved as a Script or Script Bundle using the Apple Script Editor (or Script Debugger if you have it).
The Execute an AppleScript action gives you the option of running either a script-file or a text-script.