WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #18007, comment 8


Ignore:
Timestamp:
10/08/12 19:51:29 (21 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18007, comment 8

    initial v1  
    33[attachment:18007.2.patch] is a more complete patch using `substr()`. 
    44 
    5 [attachment:18007.2.alt.patch] is an another take using `count( str_split() )` instead of `strlen()`. 
     5[attachment:18007.2.alt.patch] is another take using `count( str_split() )` instead of `strlen()`. 
    66 
    77Unfortunately, a quick test with 3 000 000 iterations of `is_serialized()` showed that `substr()` is about 2 times slower than direct access, and `count( str_split() )` is 3 times slower than `strlen()`: