Commit 0fd3e3f
committed
Time::HiRes Win32 add nv_gettimeofday() nv_clock_gettime() anti-precsn loss
-add NV retval variants nv_gettimeofday() and
nv_clock_gettime(clock_id, &status), the splitting of the solo U64,
into 2 IVs/UVs (64b IVs/UVs on my system), then recombing those 2 integers
with integer or FP double logic, was very messy and verbose machine code
and no, MSVC didn't "algebra" const fold away the splitting and recombing
logic, so just create polyfills that always return NVs from the start
-do "- ((U64)EPOCH_BIAS" with U64 logic, for maximum chance of
no rounding/no precision loss, then do division with FP logic for maximum
fractional number precision
-"NV nv = nv_clock_gettime(clock_id, &status);" is inlined away,
var bool status; has no C stack or register representation in mach code
with MSVC 2022 -O1. Returning a pass by copy
struct {NV nv; bool success;}; was considered, but never tried, b/c of
Win64 AMD64 ABI's "rule" of all retval types > 8 bytes become secret ptrs
and a secret 1st arg. Maybe MSVC would inline and fold away the struct,
maybe it would not. I didn't try it. Current impl is working as intended.
-nv_clock_gettime() still needs to reject junk values in clock_id remember
-add tick_frequency_nv, so U64 -> NV is done 1x at startup, not in the
run loop
-S_croak_xs_unimplemented(const CV *const cv) silence CC warning, cv_name()
doesn't want a const CV* head struct1 parent df9801d commit 0fd3e3f
1 file changed
+96
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
249 | 253 | | |
250 | 254 | | |
251 | 255 | | |
| |||
270 | 274 | | |
271 | 275 | | |
272 | 276 | | |
| 277 | + | |
273 | 278 | | |
274 | 279 | | |
275 | 280 | | |
| |||
331 | 336 | | |
332 | 337 | | |
333 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
334 | 343 | | |
335 | 344 | | |
336 | 345 | | |
| |||
447 | 456 | | |
448 | 457 | | |
449 | 458 | | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
450 | 471 | | |
451 | 472 | | |
452 | 473 | | |
| |||
477 | 498 | | |
478 | 499 | | |
479 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
480 | 525 | | |
481 | 526 | | |
482 | 527 | | |
| |||
807 | 852 | | |
808 | 853 | | |
809 | 854 | | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
810 | 858 | | |
811 | 859 | | |
812 | 860 | | |
813 | 861 | | |
| 862 | + | |
814 | 863 | | |
815 | 864 | | |
816 | 865 | | |
817 | 866 | | |
818 | 867 | | |
819 | 868 | | |
820 | 869 | | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
821 | 873 | | |
822 | 874 | | |
823 | 875 | | |
824 | 876 | | |
| 877 | + | |
825 | 878 | | |
826 | 879 | | |
827 | 880 | | |
| |||
1116 | 1169 | | |
1117 | 1170 | | |
1118 | 1171 | | |
1119 | | - | |
| 1172 | + | |
1120 | 1173 | | |
1121 | 1174 | | |
1122 | | - | |
| 1175 | + | |
1123 | 1176 | | |
1124 | 1177 | | |
1125 | 1178 | | |
| |||
1175 | 1228 | | |
1176 | 1229 | | |
1177 | 1230 | | |
| 1231 | + | |
1178 | 1232 | | |
1179 | 1233 | | |
1180 | 1234 | | |
| |||
1509 | 1563 | | |
1510 | 1564 | | |
1511 | 1565 | | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
1512 | 1572 | | |
1513 | 1573 | | |
1514 | 1574 | | |
1515 | 1575 | | |
1516 | 1576 | | |
1517 | 1577 | | |
1518 | 1578 | | |
| 1579 | + | |
| 1580 | + | |
1519 | 1581 | | |
1520 | 1582 | | |
1521 | 1583 | | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
1522 | 1590 | | |
1523 | 1591 | | |
1524 | | - | |
| 1592 | + | |
| 1593 | + | |
1525 | 1594 | | |
1526 | 1595 | | |
1527 | 1596 | | |
1528 | 1597 | | |
1529 | 1598 | | |
1530 | 1599 | | |
1531 | 1600 | | |
1532 | | - | |
1533 | | - | |
1534 | | - | |
| 1601 | + | |
1535 | 1602 | | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
1536 | 1607 | | |
1537 | 1608 | | |
1538 | 1609 | | |
| |||
1559 | 1630 | | |
1560 | 1631 | | |
1561 | 1632 | | |
1562 | | - | |
1563 | 1633 | | |
1564 | 1634 | | |
1565 | | - | |
| 1635 | + | |
| 1636 | + | |
1566 | 1637 | | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
1567 | 1641 | | |
1568 | 1642 | | |
1569 | 1643 | | |
1570 | 1644 | | |
1571 | 1645 | | |
1572 | 1646 | | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
1573 | 1650 | | |
1574 | 1651 | | |
1575 | 1652 | | |
| |||
1739 | 1816 | | |
1740 | 1817 | | |
1741 | 1818 | | |
| 1819 | + | |
1742 | 1820 | | |
1743 | 1821 | | |
| 1822 | + | |
1744 | 1823 | | |
1745 | 1824 | | |
1746 | 1825 | | |
1747 | 1826 | | |
1748 | 1827 | | |
1749 | 1828 | | |
| 1829 | + | |
1750 | 1830 | | |
1751 | | - | |
1752 | 1831 | | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
| 1836 | + | |
| 1837 | + | |
| 1838 | + | |
| 1839 | + | |
1753 | 1840 | | |
1754 | 1841 | | |
1755 | 1842 | | |
| |||
0 commit comments