Density dependence of the dephasing and energy relaxation times by computer simulations