Skoči na glavni sadržaj

Stručni rad

BENCHMARKING PHP MODULES

Alen Šimec ; Tehničko veleučilište u Zagrebu, Zagreb, Hrvatska
Davor Lozić ; Tehničko veleučilište u Zagrebu, Zagreb, Hrvatska
Lidija Tepeš Golubić ; Tehničko veleučilište u Zagrebu, Zagreb, Hrvatska


Puni tekst: engleski pdf 918 Kb

str. 95-100

preuzimanja: 569

citiraj


Sažetak

This paper presents how C programming language could be used for this type of tasks, created as PHP module and then get imported in the PHP language. The purpose of this paper is to show how and when is better to build PHP modules in C, instead of normal PHP functions, and to show negative sides of this type of programming. Profiling, as an important aspect of finding application bottlenecks, is also discussed. Profiling systems like Xdebug, Qcachegrind and Webgrind are also elucidated. This paper contains source code which calculates Fibonacci sequence and multiplies 800x800 matrices written in C and PHP programming languages. Results show that whenever there is a need for a mathematical computation, C will be many times faster and that it is much more cost-effective to write such code in C and create a PHP module.

Ključne riječi

benchmarking; PHP internals; PHP modules; scripting language; server side

Hrčak ID:

183672

URI

https://hrcak.srce.hr/183672

Datum izdavanja:

28.6.2017.

Podaci na drugim jezicima: hrvatski

Posjeta: 1.788 *