Commit 3dc72f4
committed
time: implement the encoding.(Binary|Text)Appender for Time
"Time.Marshal(Binary|Text)" could also gain some performance
improvements. Here is the benchmark highlight:
│ old │ new │
│ sec/op │ sec/op vs base │
MarshalText-8 104.00n ± 3% 67.27n ± 2% -35.32% (p=0.000 n=10)
MarshalBinary-8 31.77n ± 2% 12.13n ± 1% -61.82% (p=0.000 n=10)
geomean 57.48n 28.57n -50.30%
│ old │ new │
│ B/op │ B/op vs base │
MarshalText-8 48.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
MarshalBinary-8 16.00 ± 0% 0.00 ± 0% -100.00% (p=0.000 n=10)
│ old │ new │
│ allocs/op │ allocs/op vs base │
MarshalText-8 1.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
MarshalBinary-8 1.000 ± 0% 0.000 ± 0% -100.00% (p=0.000 n=10)
For #623841 parent 2709358 commit 3dc72f4
File tree
4 files changed
+68
-27
lines changed- api/next
- doc/next/6-stdlib/99-minor/time
- src/time
4 files changed
+68
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
123 | | - | |
124 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
1435 | 1435 | | |
1436 | 1436 | | |
1437 | 1437 | | |
1438 | | - | |
1439 | | - | |
| 1438 | + | |
| 1439 | + | |
1440 | 1440 | | |
1441 | 1441 | | |
1442 | 1442 | | |
| |||
1452 | 1452 | | |
1453 | 1453 | | |
1454 | 1454 | | |
1455 | | - | |
| 1455 | + | |
1456 | 1456 | | |
1457 | 1457 | | |
1458 | 1458 | | |
1459 | 1459 | | |
1460 | 1460 | | |
1461 | 1461 | | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
1465 | | - | |
1466 | | - | |
1467 | | - | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
| 1465 | + | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
1471 | 1471 | | |
1472 | | - | |
1473 | | - | |
1474 | | - | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
1475 | 1475 | | |
1476 | | - | |
| 1476 | + | |
1477 | 1477 | | |
1478 | | - | |
| 1478 | + | |
1479 | 1479 | | |
1480 | | - | |
| 1480 | + | |
1481 | 1481 | | |
| 1482 | + | |
| 1483 | + | |
1482 | 1484 | | |
1483 | | - | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
1484 | 1488 | | |
1485 | 1489 | | |
1486 | | - | |
| 1490 | + | |
1487 | 1491 | | |
1488 | 1492 | | |
1489 | 1493 | | |
| |||
1576 | 1580 | | |
1577 | 1581 | | |
1578 | 1582 | | |
1579 | | - | |
| 1583 | + | |
1580 | 1584 | | |
1581 | 1585 | | |
1582 | 1586 | | |
1583 | | - | |
1584 | | - | |
| 1587 | + | |
1585 | 1588 | | |
1586 | 1589 | | |
1587 | | - | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
1588 | 1604 | | |
1589 | 1605 | | |
1590 | 1606 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1403 | 1403 | | |
1404 | 1404 | | |
1405 | 1405 | | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
1406 | 1413 | | |
1407 | 1414 | | |
1408 | 1415 | | |
| |||
1418 | 1425 | | |
1419 | 1426 | | |
1420 | 1427 | | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
| 1434 | + | |
| 1435 | + | |
1421 | 1436 | | |
1422 | 1437 | | |
1423 | 1438 | | |
| |||
1510 | 1525 | | |
1511 | 1526 | | |
1512 | 1527 | | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
1513 | 1535 | | |
1514 | 1536 | | |
1515 | 1537 | | |
| |||
0 commit comments