What's the most efficient way to check for duplicates in an array of data using Perl?

前端 未结 7 1598
花落未央
花落未央 2020-12-05 14:26

I need to see if there are duplicates in an array of strings, what\'s the most time-efficient way of doing it?

7条回答
  •  星月不相逢
    2020-12-05 14:58

    Please don't ask about the most time efficient way to do something unless you have some specific requirements, such as "I have to dedupe a list of 100,000 integers in under a second." Otherwise, you're worrying about how long something takes for no reason.

提交回复
热议问题