With the proliferation of high-frequency trading (HFT), understanding the effects of HFT on market quality and the opportunities that HFT creates for long-term (LT) investors is important in building an efficient regulatory framework. This paper demonstrates an approach that allows us to estimate the effects of HFT on market quality using information on daily aggregate volumes of HFT and of LT investors provided by a bulge-bracket broker in two trading environments that are different in terms of electronic liquidity: the evolving Tokyo equity market and the mature London equity market. Our results suggest that in both markets HFT volumes are highly concentrated in mega-cap names with the highest floating shares. High-frequency trading is mostly involved in opportunistic liquidity provisioning rather than engaging in predatory strategies. However, HFT does not aim to maximize liquidity provision to LT. It is mostly active within a "comfort zone" of moderate volatility regimes, while largely avoiding news-driven open sessions and winding down open positions prior to the closing bell. We confirm that HFT activity can be linked to an increase in short-term volatility; this adverse effect on the transaction costs is offset by significant bid-ask spread compression. For our universe of trades the net result is cost savings. Other investment strategies may fare differently in the presence of HFT; the framework we present here can be used to analyze the net HFT impact.