In Gnosticism, the physical world did not ultimately matter - which meant physical suffering did not matter either. Seeking 'enlightenment' meant cultivating an attitude of detachment, even indifference.
Gnosticism was stamped out completely and its remnants are so badly mangled that special study is needed to get any insight at all into its inner meaning.