Skip to content

Instantly share code, notes, and snippets.

@python1981
python1981 / gist:ffeb3725b977b6c36f5c8e038c7e8f35
Created September 2, 2020 16:26 — forked from kipanshi/gist:4007717
Django float format and intcomma optimization
import cProfile
from django.template.defaultfilters import floatformat as floatformat_django
from django.contrib.humanize.templatetags.humanize import intcomma as intcomma_django
num = 100000
float_num = 1 / 3.0
def floatformat(value, places=2):