Why is DUE port access so slow?

I see another reply came in, anyways this is what I already had:

If the function generator is providing 0-3.3V signal(s) to the inputs on the Due, then no pullup resistors are necessary on the input side.

ULN2803A Datasheet

This is a slow device ... 0.25µs to 1µs rise/fall with RL = 125Ω, VOUT = 50 V.

Also, the output will not start conducting until the input is somewhere around 2.2 to 2.5V (see fig 18). This further impedes the max switching speed.

If the ouputs of the Due are connected to the ULN2803A, you'll need to use low values for RL (pullup) on the outputs (of the ULN2803A).

Do you intend to level shift the signals to 5V? If so, there is more current available and you could test using i.e. 470Ω resistors.

If you need to keep the signals at 3.3V, then there is much less current available from the 3.3V regulator, perhaps about 50mA or so. This would limit your pullup resistors (on the outputs of the ULN2803A) to around 1K (26mA total load).

No matter what you try, you'll be lucky to achieve more than 500kHz switching rate.