As you say, Durham is ranking higher for Computer Science. Research quality for it is 86% at Durham, 79% at St Andrews. The St Andrews Computer Science building is not as new. But the student satisfaction at St Andrews for this subject is just a little higher (81% v 78%). Now, student satisfaction can only get you so far. It's very nebulous as it can be so affected by how difficult the degree was so Oxford and Cambridge don't even monitor, or at least publish, how satisfied their students are to the CUG. Also, students paying more to attend a university, or being at the universities seen as having high prestige, are going to have more cause to feel dissatisfied if it doesn't reach a certain expected standard for them. Also, some universities could easily put implicit expectation on students that they're 'feeling satisfied'. It wouldn't take much, would it? 'Field trips'/fun away days. Motivational speak. Reminders to vote etc. And you'd have more 'need' to try to feel satisfied at St Andrews because the university is more the place. If you don't feel satisfied with your university there, you're not going to have a whole lot more things going on there to make your life feel better. St Andrews is currently on 84% student satisfaction for all subjects as a whole (first of all universities and immediately followed by some much less prestigious universities). Durham is on 78%, which is above Glasgow, Birmingham, Nottingham, Bristol, KCL, Manchester, Edinburgh, Leeds
That said, if a university is getting less than, say, 65% student satisfaction, it's possibly not doing some things as well as it might. But no UK universities do, for all subjects on average at least.
As universities as a whole, these two could hardly be more equal. If prestige is partly suggested by the percentage of private school students there, at St Andrews it's currently 40%, at Durham it's 39% (at Oxbridge, particularly Cambridge, they've been trying to find ways to increase state school acceptance). Obviously, at St Andrews you'll do an extra year. The Scottish system allows you to study other subjects for so long (including ones that seem generally unrelated to Computing) without necessarily doing a joint degree with them.
Durham's research quality for all subjects is 3.34 out of 4, St Andrews 3.31 out of 4. They both come to 83% so essentially equals. St Andrews research intensity is 71%, Durham's 70% so just about equals.
You mentioned about liking the potential to meet international students. St Andrews has the 5th highest percentage of all UK universities, after 4 London universities, on 45.9%, however St Andrews is a small university so only 5425 students are international. At Durham, it's 30% (26% from outside of the EU, 4% from the EU), which comes to over 4500 students so St Andrews still has a greater number of international students. Durham is specifically trying to increase its percentage to 39% because the very best people for a course don't necessarily mostly live in the UK obviously.
There is a bigger gender gap at St Andrews. At Durham, 54% of students are male, 46% female. At St Andrews, 59% female and 41% male.
It's not necessarily that St Andrews is trying to be more feminist. The place and range of available courses might just appeal to female students more. Considerably more teaching staff at St Andrews are male (66.5%) than female (33.5%). At Durham, it's 58% male teachers, 42% female.
You should really visit St Andrews during term time (and must be Monday to Friday) to get a sense of what I couldn't during its downtime. If it's somewhere you might spend several years, it's the least you should do. While up there, you could visit Dundee and Edinburgh, make a little break of it. I hope to revisit St Andrews one day as a tourist during term time. I still don't know if it's a place I'd be happy to spend so long living. I require fresh stimulation a lot so would likely find it too low key and the traditions more like a forced way to create some entertainment in quite an isolated place. If I was blanked by the private school or international intake there I'd be far more annoyed or disheartened than I would be at Durham. That said, I'd really like to be proven wrong about the feel of St Andrews during term time so have a visit.