I don't know if US President Barack Obama checked his pulse during the state dinner, but it would have been understandable if he had done so.

British Prime Minister David Cameron made the sort of speech that politicians normally only make about other politicians when they're dead.

It was a remarkable paean of praise, all the more remarkable in that it came from a Conservative leader to a man loathed by conservatives in his own country.

State dinners are designed to impress, indeed to overwhelm, with their sense of panache and style. This was the largest such affair given by the Obamas and it lived up to expectations.

Guests were served crisped hake, bison Wellington and lemon pudding with huckleberry sauce in a big tent on the White House's South Lawn.

And big tent politics was what it was all about. The president had kind words for his guest. In particular, he remembered the sad death of the Camerons' young son.

"All of us have seen how you, as a parent, along with Samantha, have shown a measure of strength that few of us will ever know. Tonight, I thank you for bringing that same strength and solidarity to our partnership."

And Obama praised his ally's character.

"He's just the kind of partner that you want at your side," he said. "I trust him."

The event glowed, almost literally. There were chandeliers hanging from the roof of the tent. The tables and guests were bathed in a purple glow from tinted lights.

But the most lavish thing about the evening was Cameron's praise for his host. He said that what stood out was Obama's "strength, moral authority and wisdom".

"He has pressed the reset button on the moral authority of the entire free world... and has found a new voice for America with the Arab people."

This wasn't just about the world stage. Cameron talked about the civil rights movement, and said that in pursuing education reform Obama had shown "enormous courage".

Cameron concluded: "Barack, it is an honour to call you an ally, a partner and a friend." And all this is just a flavour of a detailed argument.

I have no doubt Cameron means every word. But politicians don't necessarily decide to say out loud everything that passes through their head.

This isn't the British prime minister getting carried away by a posh do. There is strategy here. Such extravagant praise, of course, cements their relationship.

But it also carries a message home to swing voters and to Liberal Democratic voters that Dave the right-winger is a big fan of a man who is still a liberal icon.

The two men went out of their way to claim that their economic policies were pretty similar.

When I suggested otherwise in a piece for the Today programme earlier in the week, the Treasury were on to me quickly with facts and figures to counter the suggestion that Obama's stimulus was the opposite of British austerity.

Cameron's words also tell voters at home that British Conservatives have nothing to do with the type of American Conservatives who call Obama a socialist and go on about gay marriage.

Cameron has not made time to see any of the Republican candidates for the presidency. To British centrist voters who may think some of those on offer are a few raisins short of a fruit cake, that counts as reassurance.

Cameron's visit hasn't been widely trumpeted in the States so this sort of ringing endorsement of Obama's policies and personality may not be hugely influential in this year's presidential election.

But it is very useful background noise. A leading conservative with a reputation for making hard-headed cuts has endorsed the US president's economic and foreign policy.

It also makes Obama look like a centrist, a moderate.

This state dinner brought a glitter that is electoral gold dust for both leaders.