Which is better among these two to make complex 2d games ?
Is Cocos2d-x better than Godot in performance ?
They're both good choices, but they both do different things; Godot is more of a "full featured" game engine and tool suite whereas Cocos2d is more of a 2D graphics framework (only). Although if you're also talking about the "Cocos Creator" product offered by the Cocos team, that's a bit more on par with Godot in terms of functionality and design goals as an integrate toolset for building games.
Both options will be plenty fast enough for you to make complex 2D games with. At this point in your development as a game developer, the limiting factor on performance is you and your ability to bend the tools to your whims and understand them. Not the tools themselves.
So try both out, pick the one that feels better to you, the one that works the way you want to work, and use that.