Verification: a143cc29221c9be0

Php check all array values

Содержание

RANDOM BOOLEANS

  • in_array: 10 bools = 0.16 sec
  • foreach: 10 bools = 0.122 sec
  • array_unique: 10 bools = 0.274 sec
  • foreach_bin: 10 bools = 0.095 sec
  • in_array_bin: 10 bools = 0.073 sec
  • array_sum: 10 bools = 0.074 sec
  • array_filter: 10 bools = 0.118 sec

  • in_array: 100 bools = 0.153 sec
  • foreach: 100 bools = 0.122 sec
  • array_unique: 100 bools = 2.3451 sec
  • foreach_bin: 100 bools = 0.094 sec
  • in_array_bin: 100 bools = 0.074 sec
  • array_sum: 100 bools = 0.126 sec
  • array_filter: 100 bools = 0.228 sec

  • in_array: 1000 bools = 0.154 sec
  • foreach: 1000 bools = 0.149 sec
  • array_unique: 1000 bools = 32.6659 sec (!!)
  • foreach_bin: 1000 bools = 0.075 sec
  • in_array_bin: 1000 bools = 0.074 sec
  • array_sum: 1000 bools = 0.8771 sec
  • array_filter: 1000 bools = 1.4021 sec