So in case you have a GPU available, simply switch the plugin by changing sensor type ray to gpu_ray and plugin filename from libgazebo_ros_laser.so to libgazebo_ros_gpu_laser.so (parameters are the same).