Work

Benchmarking Php Modules

Year: 2017
Type: article
Abstract: 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. Sažetak Ovaj rad predstavlja kako se za ovakve probleme može koristiti programski jezik C, kao PHP modul, te pozvati iz PHP jezika. Cilj ovog ujedno je pokazati kako i kada je bolje, umjesto običnih PHP funkcija, raditi PHP module u programskom jeziku C te prikazati i negativne strane takvoga programiranja. Rad objašnjava i pronalazak "uskog-grla" u aplikacijama pomoću sustava kao što su Xdebug, qcachegrind i webgrind.U radu je prikazan izvorni kod koji računa Fibonaccijev niz te množi matrice veličine 800x800 u programskim jezicima C i PHP.Dobiveni rezultati pokazuju da je u svim slučajevima gdje je bio potreban matematički izračun, programski jezik C bio višestruko brži te da je u takvim slučajevima isplativije napisati izvorni kod u programskom jeziku C i izraditi PHP modul.
Language: English
Open Access status: green
OpenAlex ID: W2901898229
FWCI: 0.263
Cites: 2
Cited by: 2
Related to: 10