This has nothing to do with improving raster to polygon conversion but, rather a bit of lack of understanding in how this should be applied. Converting a raster to polygons is intended to convert integer rasters with clustered values (eg., landcover) to a vector geometry. You are trying to convert a floating point raster with no discrete spatial patterns. In effect, you are converting every unique cell in your raster to a polygon.
Here is a simple solution to what you are after. The process is to create a raster with a uniform value, based on a copy of your original raster, then just mask it. This will give you a raster with a single value representing the areas with values in the original raster. This can then be converted to polygon(s).
r <- raster(system.file("external/rlogo.grd",
r[r >= 200] <- NA
e <- raster(extent(r), nrows = nrow(r),
ncols = ncol(r))
e <- 1
e <- mask(e, r)
p <- rasterToPolygons(e, dissolve = TRUE)