Commit e246b3d
committed
Add a fast pre-check for equality of equal-length strings.
Testing reveals that that doing a memcmp() before the strcoll() costs
practically nothing, at least on the systems we tested, and it speeds
up sorts containing many equal strings significatly.
Peter Geoghegan. Review by myself and Heikki Linnakangas. Comments
rewritten by me.1 parent 491c029 commit e246b3d
1 file changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1405 | 1405 | | |
1406 | 1406 | | |
1407 | 1407 | | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
| 1414 | + | |
| 1415 | + | |
| 1416 | + | |
| 1417 | + | |
| 1418 | + | |
| 1419 | + | |
1408 | 1420 | | |
1409 | 1421 | | |
1410 | 1422 | | |
| |||
1842 | 1854 | | |
1843 | 1855 | | |
1844 | 1856 | | |
| 1857 | + | |
| 1858 | + | |
| 1859 | + | |
| 1860 | + | |
| 1861 | + | |
| 1862 | + | |
| 1863 | + | |
1845 | 1864 | | |
1846 | 1865 | | |
1847 | 1866 | | |
| |||
1875 | 1894 | | |
1876 | 1895 | | |
1877 | 1896 | | |
| 1897 | + | |
1878 | 1898 | | |
1879 | 1899 | | |
1880 | 1900 | | |
| |||
0 commit comments