head to head
Neither is simply harder - they are hard in different places. Machinarium demands more variance; Portal demands more execution.

Optimization · Pure Optimization
A wordless robot puzzle adventure where every environmental obstacle has exactly one elegant solution.

Optimization · Pure Optimization
The portal-gun puzzle game whose solutions are everything.
Machinarium leans Optimization (Pure Optimization); Portal leans Optimization (Pure Optimization).
Portal leans clearly harder on execution.
Machinarium
A handful of mini-games require basic timing and clicking precision
Portal
Portal placement timing modest.
Same score on reads - which means the number cannot separate them. The difference is in what each one asks of you.
Machinarium
Solo robot puzzle game with no opponent
Portal
No adversary modeling player.
Machinarium leans clearly harder on variance.
Machinarium
Arcade mini-games add minor randomness but are skipable
Portal
Deterministic chambers; no randomness.
Machinarium leans a little harder on optimization, though the gap is small.
Machinarium
Environmental logic puzzles are tightly designed closed-world problems
Portal
Pure puzzle-solving optimization.
A matching score does not mean a matching test. Two games can both sit at 10 on execution and demand completely different things of you - which is why the reasoning above matters more than the number beside it.