DEV Community

Discussion on: Compile-time polymorphism !!

Collapse
 
bluma profile image
Roman Diviš • Edited

Do You tried to perform any kind of serious benchmark to measure performance with early/late bound methods? Saying just “really faster” is not much exact thing. As there still is low level code that is needed to perform call (move values of parameters on stack, jump, prepare stack for new function, cleanup) it might be good to support this statement by some numbers. Also this performance will be much affected by selected compiler, iťs version, compilation options, platform and code itself (parameters of function, local variables).

Collapse
 
jeyanthan profile image
Srijeyanthan

Thanks Roman, The results were obtained while were running our low-latency message streaming platform leorix (leorix.io). If we are using it for general purpose, then we don't much see the time deviation notable, but as per my example, it shows part of log writer class where frequency calling like 100K Msg/Sec streaming. We have evaluated the performance not just the time taken to execute this compile-time binding, instead message per sec handling by the sytem. With the dynamic binding, it was around 92-95 K Msg/Sec. When we were tracing back the bottleneck, one is this one. !!