I gather it is the stepwise selection that is slowing you down, so you would speed up your code by skipping the stepwise selection. As it happens, I would suggest you do not use stepwise selection for other reasons as well. If you want to test hypotheses, stepwise selection will invalidate the reported $p$-values. If you want to build a predictive model, it will yield a model that is overfitted. There is, in essence, no good reason for using stepwise selection. If that doesn't make sense / you want to learn why, you could read my answer here: Algorithms for automatic model selection.
If you need to do variable selection with logistic regression for some reason, you can use the LASSO method. Some of the threads listed in this search may be helpful for you.