Guys guys guys , stop fighting on this octa vs quad , Q vs Sam, huawei, etc, everything depends upon two things ,
1st one : the software running ,, I mean touchwiz with earlier builds was way laggy as compared to stock or near stock roms so that's a major factor , the UI that phone is running decides the performance of phone , I now own i9500 variant of s4 that's octa core and it's performance on cyanogenod is way better than touchwiz so that's a factor
2: the second factor is the generation of chipset used ,, a latest version of quad core even dual core can actually kick out a octa or even Decca core of absolete generation of chipset , for example compare apple processors they are made by samsung but later are modified by Apple for their products and results are in front of you guys , yeah ios is way better in managing memory but that's just memory , both of them use almost comparable amount of processor, . Another example is the Asus zenfone 2, it's based on Intel architecture compared to exynos and qualcomm which use different architecture that's "ARM" architecture , both have different capabilities and the results are in front of you guys ,,
So the combination of both the software and hardware makes the phone snappier and about ram usage , that depends upon two things 1st one is same as above (the hardware technology) and second one is the software optimization as well as numbers of running applications in background . That's it all I know