The S&P 500 and Nasdaq Composite surged to record highs on Wednesday, driven by strong reports from Salesforce and Marvell Technology, with tech stocks leading the rally.