id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 21052,force_bytes should handle the common case first like force_text,Aymeric Augustin,nobody,"The patch I'm about to commit makes `force_bytes` twice as fast in the common case — and twice as slow when it's called with a memoryview, but we don't use them that often in Django. Before: {{{ % python -m timeit -s 'from django.utils.encoding import force_bytes' 'force_bytes(b"""")' ~/Documents/dev/django 1000000 loops, best of 3: 0.705 usec per loop }}} After: {{{ % python -m timeit -s 'from django.utils.encoding import force_bytes' 'force_bytes(b"""")' ~/Documents/dev/django 1000000 loops, best of 3: 0.376 usec per loop }}}",Cleanup/optimization,closed,Utilities,dev,Normal,fixed,,,Accepted,0,0,0,0,0,0