In theory the active ingredient Donepezil Hydrochloride is exactly the same in both, Aricept is just a branded trademark name, however, as Joanne says the none active ingredients vary, there are also a number of different producers of Donepezil so even 2 different brands of the same product may vary.
I do think some people want Aricept as it's more expensive and branded so it has to be better, I want the M&&S version not the Aldi version way of thinking, however, it does seem to come up fairly regularly that people have issues with Donepezil that they never had with Aricept so maybe it does warrant looking into.
The same can be said about Simvastatin, doctors prescribe it because it's cheap, if you have a reaction to it then they have to use a more expensive alternative and they don't seem to like doing that.
You could take your next prescription to a different chemist and see if they use a different brand, the tablets I get from the chemist in Asda are different to the ones I get from the local chemists.
K