[fpc-pascal] Interface performance

Ryan Joseph ryan at thealchemistguild.com
Fri Nov 11 09:25:27 CET 2016

I did some experimenting this morning and found out I could pass references to the interface and call methods directly without using Supports and incurring the string compare penalty. There’s also interface delegation I read about and using “implements” keyword but I couldn’t understand what the purpose of this is and why it’s even useful.

> On Nov 10, 2016, at 6:45 PM, Ryan Joseph <ryan at thealchemistguild.com> wrote:
> Some times when I want to communicate with a class I don’t have full scope access to I’ll use interfaces and the Supports function to call a method. I’ve noticed however that the string compare function that it is used to find the interface in the class is very slow and makes them not useable for high performance situations. Is there a better way to do this or should I not use interfaces like this in FPC?

	Ryan Joseph

More information about the fpc-pascal mailing list