Which operation a microcontroller can perform faster generally; to read a digital pin state or to take an ADC reading?
And how is the answer for my microcontroller Atmel SAM3X8E?
As Lawrence NK1G correctly pointed out, ADC is virtually always slower than a digital pin read. ADC requires several samples over a period of time to determine an analog voltage. This always takes multiple clock cycles. Reading a digital pin requires only one sample and take as few as one or two clock cycles depending on the microcontroller. According to this page http://asf.atmel.com/docs/3.21.0/sam3s/html/adc_use_case_1.html , the maximum ADC sample rate for your microcontroller is 1MHz. Compare that to this page https://forum.arduino.cc/index.php?topic=252690.0 which says that it should be possible to read a digital pin at 21MHz on the Arduino Due which uses the Atmel SAM3X8E.