[aspectc-user] Setting return value in advice very expensive

Stefan Marr aspectc at stefan-marr.de
Thu Sep 1 20:21:19 CEST 2011


We have here a simple around advice which replaces basically the original function and needs to return a value.

In our benchmark that leads to an overall performance impact of 10% which is quite a bit.
It is not exactly a tight loop but on the critical path of every interpreter action.

The advice reads as follows:

	advice execution("_VMFrame* Interpreter_get_frame()") : around() {
		pVMFrame frame = (pVMFrame)VMThread_get_safe_global(tsg_frame);
		*tjp->result() = frame;

Are there any tips or hacks that could lead to less performance overhead?


Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
Phone: +32 2 629 2974
Fax:   +32 2 629 3525

More information about the aspectc-user mailing list