Shares of Google (Nasdaq: GOOG), the No. 1 search engine, set a new record high of $672.23 Tuesday, a day after the Mountain View, Calif., announced it would take a $275 million charge for firing 4,000 employees of its new Motorola division.

By midmorning, Google shares had eased back slightly to $671.18, up $11.17, after setting a five-month high on Monday. Overall U.S. markets rose slightly in Tuesday morning trading.

Not to be outdone, shares of arch-rival Apple (Nasdaq: AAPL), the world's most valuable technology company, inched near their record high of $644, set April 10. In Tuesday trading, shares of the Cupertino, Calif., electronics and entertainment developer hit $636.22, before easing back to $635.97, up $5.97, boosting its market value to $596 billion.