Project

General

Profile

Actions

Task #80283

closed

Use direct array assignments instead of array_push

Added by Cedric Ziel over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2017-03-15
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

This is a micro optimization, since array_push is slower than direct assignments.

Direct assignments are also more readable than array_push. Occurrences with only one element in the value list should be changed to direct assignments.

Tiny little benchmark, just in case someone wants to have a look: https://3v4l.org/tk351

Actions #1

Updated by Gerrit Code Review over 7 years ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52049

Actions #2

Updated by Gerrit Code Review over 7 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/52049

Actions #3

Updated by Cedric Ziel over 7 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #4

Updated by Riccardo De Contardi about 7 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF