Hi Przemek, I still think we should have no HB_NO_DEBUG switch to avoid debug overhead.
The debug overhead comes from these few sources: - hb_vmDo() - hb_vmSend() - HB_P_LINE opcode - HB_P_MODULENAME opcode From these, HB_P_LINE can easily be suppressed by /l switch for maximum speed and small footprint, same can be done by not using /b switch to avoid HB_P_MODULENAME pcodes completely. That leaves hb_vmDo()/hb_vmSend(). I assume the biggest stake of the overhead comes from call via these opcodes: HB_P_DO, HB_P_DOSHORT, HB_P_FUNCTION, HB_P_FUNCTIONSHORT, HB_P_SEND, HB_P_SENDSHORT. Question: What if had debug and non-debug versions of hb_vmDo()/hb_vmSend() with corresponding debug and non-debug flavours of HB_P_* opcodes, and Harbour compiler would use the debug ones when /b was used and the fast non-debug ones when /b is not used, which is the default. That would leave a minimal overhead in direct hb_vmDo/hb_Send() calls only, but that's probably negligible, and in return we could get rid of HB_NO_DEBUG. What's your opinion? Brgds, Viktor _______________________________________________ Harbour mailing list [email protected] http://lists.harbour-project.org/mailman/listinfo/harbour
