This paper aims to assess the performance of Islamic portfolios vis-à-vis their conventional counterparts across two distinct periods: the pre-COVID-19 era and the COVID-19 era. Departing from prior studies, this study makes a novel contribution by employing an extensive array of 18 portfolio optimization techniques to construct optimal portfolios for conventional stock indices encompassing energy, utilities, and environmental, social, and governance (ESG) dimensions, as well as their Islamic equivalents. Performance comparisons are made utilizing three risk-adjusted performance measures, namely the Sharpe ratio, the Omega ratio, and the Sortino ratio. Our findings reveal that Shariah portfolios outperform conventional portfolios across all performance measures and risk-aversion levels when the most effective optimization methods are employed, both during pre-crisis and crisis periods. Additionally, our analysis highlights certain methods, namely EWMA, GM, DCC, and SHC, which produce portfolios exhibiting superior performance relative to alternative methods, as assessed by risk-adjusted metrics. Furthermore, Islamic portfolios demonstrate higher average returns compared to their conventional counterparts. Notably, incorporating ESG-related stocks into energy and utilities assets significantly enhances average returns, underscoring the potential of ESG investments. Collectively, our findings have noteworthy implications for investors, as they emphasize the role of Islamic stocks as effective diversifiers, yielding favorable resource allocation opportunities during times of crisis as well as stability. However, investors should exercise caution in selecting the optimal portfolio optimization method, as substantial performance disparities exist among different approaches.