Traffic bottleneck is frequently generated near the freeway on-ramp due to the merging behaviour of vehicles. Given the technology advance of connected and automated vehicles (CAVs), this study aims to investigate the performance of CAVs on reducing the merging time at real-world freeway on-ramp via a comparison study based on both empirical and simulation data. First, real merging scenarios composed of empirical trajectory data were extracted from the Next Generation Simulation (NGSIM) dataset. Each merging scenario contains three manually driven vehicles (MDVs): the leading MDV and following MDV on the mainline, and the merging MDV from the on-ramp. Then the merging MDV is replaced by a CAV whose trajectory is optimised by a proposed optimisation model to minimise its merging time. The results indicate that under the same merging scenarios, CAVs can merge more efficiently and smoothly than MDVs while ensuring safety. Finally, sensitivity analyses were conducted to test the robustness and transferability of the proposed model.