FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
unidecode/benchmark.py at master · Python-Repository-Hub/unidecode · GitHub
Python-Repository-Hub
unidecode
Repository navigation
Code
Pull requests
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
unidecode
/
benchmark.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (24 loc) · 750 Bytes
Breadcrumbs
unidecode
/
benchmark.py
Copy path
File metadata and controls
29 lines (24 loc) · 750 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# -*- coding: utf-8 -*-
import
timeit
def
main
():
print
"unidecode_expect_ascii, ASCII string"
timeit
.
main
([
'-s'
,
'from unidecode import unidecode_expect_ascii'
,
'unidecode_expect_ascii(u"Hello, World")'
])
print
"unidecode_expect_ascii, non-ASCII string"
timeit
.
main
([
'-s'
,
'from unidecode import unidecode_expect_ascii'
,
'unidecode_expect_ascii(u"¡Hola mundo!")'
])
print
"unidecode_expect_nonascii, ASCII string"
timeit
.
main
([
'-s'
,
'from unidecode import unidecode_expect_nonascii'
,
'unidecode_expect_nonascii(u"Hello, World")'
])
print
"unidecode_expect_nonascii, non-ASCII string"
timeit
.
main
([
'-s'
,
'from unidecode import unidecode_expect_nonascii'
,
'unidecode_expect_nonascii(u"¡Hola mundo!")'
])
main
()
Back
|
FazBrowse Home
|
New Git URL