[wp-trac] [WordPress Trac] #50223: Performance improvement: Avoid using array_unique() where possible

WordPress Trac noreply at wordpress.org
Fri May 22 10:47:05 UTC 2020


#50223: Performance improvement: Avoid using array_unique() where possible
-------------------------------+------------------------------
 Reporter:  aristath           |       Owner:  (none)
     Type:  enhancement        |      Status:  new
 Priority:  lowest             |   Milestone:  Awaiting Review
Component:  General            |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  performance
-------------------------------+------------------------------

Comment (by aristath):

 Adding an inline comment like this above any line where we change to flip-
 flip should resolve the readability issue...
 {{{
 // Use array_flip( array_flip() ) instead of array_unique() for improved
 performance.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50223#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list