So, the research.
Firstly setting is not a simple word and it can mean different things in different countries.
The research generally distinguishes between three possibilities
1 streaming. This is what used to happen in some schools in the UK in the 60s/70s. You would do an intelligence test. You would then be put into a "stream" based on the test. So you might get put in top stream even if you can't do languages for toffee.
The research shows that this is not an effective way of teaching, largely because it's the worst of both mixed ability and setting. You have a top stream of largely intelligent kids, but some of whom have difficulties with specific subjects - maths, languages, whatever. The lower streams feel like failures and stop trying and you get behaviour difficulties.
Streaming is very rarely used anywhere these days.
2 mixed ability. This generally refers to a lack of selection on academic ability within the particular school. So for example you often get grammar schools which have mixed ability classes but for obvious reasons the ability range in a grammar is mostly only very bright children anyway.
True mixed ability where the whole range of ability is included within a single class is actually quite rare anywhere in the world as most students who are very low ability go to special schools and are not in mainstream.
Within secondary schools in the U.K. there has been a movement towards mixed ability recently for a whole number of reasons. I'm a maths teacher and I have been involved in advising a number of schools on this.
Within maths true mixed ability is very very hard to teach. In most secondary schools the ability range in maths goes from "can't count to 10" and has an EHCP up to "is doing Olympiad problems for fun".
Of the schools I have been involved with that have moved towards mixed ability teaching the most common model is to pull two groups off - a nurture group for the lower attainers which teaches towards the entry level qualification (below gcse) and an express group for the Olympiad types and then mixed ability for everyone else.
3 setting. This refers to the practice of grouping students by academic attainment.
Research on setting shows that
a) students are very rarely put into groups based on just academic attainment. The groups are also based on behaviour (you can't put X with Y they have a restraining order), special needs/disabilities (X is in a wheelchair so needs a ground floor room he'll have to go with teacher Y even though it's not the right group) and also, bluntly, teacher bias. There's extensive research showing BAME kids are more likely to feel in the wrong (lower) set from their attainment etc (this is U.K. research but teacher bias applies the world over).
b) setting impacts how well students do largely through the social impact of the expectations it sets for them. There is so much research showing kids in sets know exactly which set they are in and often can rank their set by attainment pretty accurately. Kids that are in bottom set know they are in bottom set and either want to get out of it and try hard or give up and don't work.
For example this study www.blatchingtonmill.org.uk/assets/Uploads/The-impact-of-tracking-by-attainment-on-pupil-self-confidence-over-time-demonstrating-the-accumulative-impact-of-self-fulfilling-prophecy.pdf
(Please not it refers to setting as tracking which is the internationally used word for setting as setting is both U.K. specific and ambiguous)