php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #1327 strtr() very slow
Submitted: 1999-04-19 15:14 UTC Modified: 1999-04-20 01:43 UTC
From: fuf at fuf dot sh dot cvut dot cz Assigned:
Status: Closed Package: Performance problem
PHP Version: 3.0.7 OS: linux-2.2.5-ac3
Private report: No CVE-ID: None
 [1999-04-19 15:14 UTC] fuf at fuf dot sh dot cvut dot cz
$converted = strtr($buffer, "<13characters>", "<13characters>");
where <13characters> are 13 characters in iso-8859-2 or windows-1250 encoding. converting approximately 15kb buffer takes 2-3 seconds on a pII 450 with 128mb of ram.

the same conversion can be done from shell with the 'tr' command _instantly_.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-04-20 01:43 UTC] thies
should be fixed in latest cvs - we were using strlen a bit too heavy.
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Aug 12 09:01:29 2020 UTC