Image copyright iStock

When the Chinese city of Shanghai took part in the three-yearly Pisa test of 15-year-olds' academic ability in 2009 and 2012 it topped the table in maths, leaving countries such as Germany the UK and the US - and even Singapore and Japan - trailing in its wake. What is its secret?

The life of a teacher in a Shanghai primary school differs quite a bit from that of teachers in most other countries. For one thing each teacher specialises in a particular subject - if you teach maths, you teach only maths.

These specialist teachers are given at least five years of training targeted at specific age groups, during which they gain a deep understanding both of their subject and of how children learn.

After qualifying, primary school teachers will typically take just two lessons per day, spending the rest of their time assisting students who require extra help and discussing teaching techniques with colleagues.

"If you compare that to an English practitioner in a primary school now, they might have five days of training in their initial teacher training year, if they're doing the School Direct route, for example," says Ben McMullen, head teacher of Ashburnham Community School, London.

"They might have some follow-up training during the first or second year of training - inset, staff meetings etcetera - but there's no comparison between the expertise of someone who's had five years of training in a specific subject to someone who's had only a handful of days."

It's a similar story in secondary school, where teachers spend less time in the classroom with pupils than they do on planning and refining lessons.

Image copyright AFP/Getty Images

There are other differences too. School days are longer - from 07:00 until 16:00 or 17:00. Class sizes are larger. And lessons are shorter - each is 35 minutes long, followed by 15 minutes of unstructured play.

There is no streaming according to ability and every student must understand before the teacher moves on. In the early years of school basic arithmetic is covered more slowly than in the UK, says McMullen, who has travelled to Shanghai in one of the groups of British teachers sent every year by the Department of Education to watch and learn.

"They looked at our curriculum and were horrified by how much we were trying to teach," he says.

"They wouldn't teach fractions until year four or five. By that time, they assume that the children were very fluent in multiplication and division.

"This is essentially a 'teaching for mastery' approach: covering less and making smaller incremental movements forward, ensuring the class move together as one and that you go over stuff again and again until it's truly understood."

My Perfect Country

In a world where a lot is going wrong there is also a lot going right. So what if you could build a country with policies that actually worked, by homing in on ideas around the world that have been truly successful?

It seems that other cities in mainland China may not be on quite the same level as Shanghai. In the 2015 Pisa test Shanghai was bundled together with Beijing, Jiangsu and Guangdong, and they jointly came fifth in maths, behind Singapore, Japan, Taiwan and Hong Kong.

It's also been suggested that Shanghai's results in previous years could have been skewed by the failure to include about a quarter of pupils in the city. However Pisa insists its results demonstrate that the children of menial workers in Shanghai outperform the children of professionals in the West.

This is one of the key attractions of the system - it helps poor children realise their potential, increasing social mobility. But there are also drawbacks, according to Henrietta Moore of the Institute for Global Prosperity at University College London.

"The idea there is that effort brings rewards and so you will get this totally driven sort of idea but what you don't get - and what Chinese maths teachers are currently grappling with - is this creative problem-solving that requires space and mulling and dwelling," she says.

"We're actually much better at this in the UK and they're trying to develop that and learn from us."

Another criticism of the system is that parents work children too hard. An estimated 80% of students receive private lessons outside school.

"One of the downsides of parental interest in education is they get competitive - they're more competitive than the children - so they want to have all these extra classes," says Moore.

Image copyright Getty Images

So is this a system other countries would do well to adopt?

"I would adopt the idea that anyone who teaches maths needs a deep understanding of the conceptual building of maths and a deep understanding of how children learn that," says Anne Watson, emeritus professor of maths teaching at Oxford University. "I would also want to take on board the idea of high expectations for everyone."

Online entrepreneur Martha Lane-Fox is also a fan.

"Two things really appeal to me about this," she says. "The idea that everyone can be more of a maths master than I think we believe here in the UK. I also really like the incredible attention to the micro-detail. I'm really interested in this notion of incrementalism and moving things on in small chunks.

"The fundamentals of this policy are right and it's incredibly inspiring to think everybody can become more freed up by maths."

Ben McMullen's primary school has already been borrowing some of Shanghai's ideas, he says.

There is no streaming, pupils are interacting more and there is a "different atmosphere" in class.

"The younger learners moving up the school have an incredibly robust sense of maths, calculation and of concept," McMullen says.

And for teachers there is another great upside, he says - less marking.

Join the conversation - find the BBC World Service on Facebook and Twitter.

Follow Harry Low on Twitter: @HarryLow49