You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove initialization of H to -1; instead, use calloc for initalizatio nto 0 and index the samples by 1, ..., n+1; also make sure to update the sampler to check if the sample is <= n, and return one minus
The main bottleneck in preprocessing is bit extraction from the a[i]. It might more efficient to compute the probability matrix in reverse order (i.e., with the least significant bit in the first column) and using integer division on the running values of a[i], instead of bit shifts/masking.
The text was updated successfully, but these errors were encountered:
https://github.com/probcomp/fast-loaded-dice-roller/blob/2fb32e94a04c744c86aa4cb54b3ee0259894e777/src/c/fldr.c#L55
https://github.com/probcomp/fast-loaded-dice-roller/blob/2fb32e94a04c744c86aa4cb54b3ee0259894e777/src/c/fldr.c#L97-L98
Remove unneeded additions
https://github.com/probcomp/fast-loaded-dice-roller/blob/2fb32e94a04c744c86aa4cb54b3ee0259894e777/src/c/fldr.c#L57
https://github.com/probcomp/fast-loaded-dice-roller/blob/2fb32e94a04c744c86aa4cb54b3ee0259894e777/src/c/fldr.c#L65
Change bool to int
https://github.com/probcomp/fast-loaded-dice-roller/blob/2fb32e94a04c744c86aa4cb54b3ee0259894e777/src/c/fldr.c#L56
https://github.com/probcomp/fast-loaded-dice-roller/blob/2fb32e94a04c744c86aa4cb54b3ee0259894e777/src/c/fldr.c#L64
The main bottleneck in preprocessing is bit extraction from the a[i]. It might more efficient to compute the probability matrix in reverse order (i.e., with the least significant bit in the first column) and using integer division on the running values of a[i], instead of bit shifts/masking.
The text was updated successfully, but these errors were encountered: