In response to Ghost of ET
Ghost of ET wrote:
He made a trailer for his game that's more than most can say for their own games

A few more diagnostics while I try and work out an algorithm for doing division, which has proven to be more difficult than I'd hoped.

These outputs are all doing BigInt arithmetic. That is, operations between two BigInt objects rather than between a BigInt object and an integer.
/*

Subtracting 1 + 1 + ... + 1 + 1 from 0xfffffff0 for 65,635 times in hexadecimal is 0xfffefff1

*/


Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
------------------------------------ --------- --------- --------- ---------
/mob/verb/Decrement_BigIntStressTest 0.072 1.132 1.132 1
/pif_BigInt/New 0.000 0.000 0.000 2
/pif_BigInt/proc/_GetBlock 0.189 0.238 0.264 196621
/pif_BigInt/proc/_SetBlock 0.088 0.109 0.117 65539
/pif_BigInt/proc/BitLength 0.000 0.000 0.000 18
/pif_BigInt/proc/Expand 0.000 0.000 0.000 3
/pif_BigInt/proc/Expandable 0.000 0.000 0.000 2
/pif_BigInt/proc/GetBits 0.001 0.001 0.001 16
/pif_BigInt/proc/GetMode 0.000 0.000 0.000 2
/pif_BigInt/proc/IsNegative 0.000 0.000 0.000 2
/pif_BigInt/proc/Length 0.088 0.094 0.130 393253
/pif_BigInt/proc/Modifiable 0.019 0.019 0.029 65535
/pif_BigInt/proc/PrintHex 0.000 0.001 0.001 2
/pif_BigInt/proc/PrintHexadecimal 0.000 0.001 0.001 2
/pif_BigInt/proc/Set 0.000 0.000 0.000 2
/pif_BigInt/proc/Subtract 0.675 1.060 1.064 65535

/*

The sum of 1 + 1 + ... + 1 + 1 for 65,535 times in hexadecimal is 0xffff

*/


Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
------------------------------------ --------- --------- --------- ---------
/mob/verb/Increment_BigIntStressTest 0.107 1.035 1.035 1
/pif_BigInt/New 0.000 0.000 0.000 2
/pif_BigInt/proc/_GetBlock 0.128 0.153 0.170 131074
/pif_BigInt/proc/_SetBlock 0.082 0.100 0.107 65537
/pif_BigInt/proc/Add 0.565 0.930 0.936 65535
/pif_BigInt/proc/BitLength 0.000 0.000 0.000 5
/pif_BigInt/proc/Expand 0.000 0.000 0.000 2
/pif_BigInt/proc/Expandable 0.000 0.000 0.000 2
/pif_BigInt/proc/GetBits 0.000 0.000 0.000 4
/pif_BigInt/proc/GetMode 0.016 0.019 0.033 131072
/pif_BigInt/proc/IsNegative 0.000 0.000 0.000 1
/pif_BigInt/proc/Length 0.067 0.072 0.097 327690
/pif_BigInt/proc/Modifiable 0.023 0.024 0.032 65535
/pif_BigInt/proc/PrintHex 0.000 0.000 0.000 1
/pif_BigInt/proc/PrintHexadecimal 0.000 0.000 0.000 1
/pif_BigInt/proc/Set 0.000 0.000 0.000 2
/pif_BigInt/proc/SetMode 0.047 0.056 0.068 65535

/*

57,005 ** 150 in hexadecimal is 0x000387f7a2d73b05dfcb4ae8c005b79b4cd4cc3506ab0da2fa92cf7391df69f220e03ab29744163e74499b6a0cf98ab6512132fa063140566ad2bee3f6172f9ef1448dc409a0a5cd95903cb3e0ca11e28c20d3141bad0cd88d2ef801767d78a3c8c12af5f3934d959e0bb2255bf31aee162657c55fad8a09986cd92e6e66367844a64d93eb9e178bb681bd95e6a751c87b1fd612854aa2f200d1ab9c6a7c72f680a57d0995ebfe534b5cdf5d8e8726cae2c79325ce916fa23f1b53d7021a487321d4a9e139047190a46452787ada43713dc845550589664e7338d8ef9b65f1e37deaf4eed5cac5d633f8ed2bf8f8237200cc477d3088e3bab500f92271b05d84c1268a5c075f22be7d0b1865ac5cd4dfd891104f2dbb9bda7e90d22ba46390848266f05ea09cf655a9b9

*/


Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
------------------------------------------- --------- --------- --------- ---------
/mob/verb/NaiveExponential_BigIntStressTest 0.000 0.762 0.762 1
/pif_BigInt/New 0.000 0.004 0.004 152
/pif_BigInt/proc/_AddAtBlock 0.338 0.577 0.582 54659
/pif_BigInt/proc/_GetBlock 0.075 0.097 0.104 82939
/pif_BigInt/proc/_SetBlock 0.099 0.117 0.127 82343
/pif_BigInt/proc/BitLength 0.000 0.000 0.000 597
/pif_BigInt/proc/Expand 0.032 0.058 0.062 11404
/pif_BigInt/proc/Expandable 0.000 0.000 0.000 300
/pif_BigInt/proc/GetBits 0.001 0.001 0.001 596
/pif_BigInt/proc/GetMode 0.000 0.000 0.000 300
/pif_BigInt/proc/IsNegative 0.000 0.000 0.000 301
/pif_BigInt/proc/Length 0.063 0.072 0.100 293283
/pif_BigInt/proc/Modifiable 0.000 0.000 0.000 150
/pif_BigInt/proc/Multiply 0.118 0.755 0.755 150
/pif_BigInt/proc/PrintHex 0.000 0.007 0.007 1
/pif_BigInt/proc/PrintHexadecimal 0.006 0.007 0.007 1
/pif_BigInt/proc/Set 0.030 0.057 0.057 302

/*

0x61f9e8fce4272fbb27aab55dfcc8235553713aa0ca958dbf0b6cb83107f19be78411678e0199f01d6e81f1d6ac251da8b862 + 0x4eb837b1c294ee4a1297a1cc79a4f41f0ef84eabc12855ae76f1f96f956b40edf3dc2764ef3982ffb8b4cd2a436eafc745b5 = 0xb0b220aea6bc1e053a42572a766d17746269894c8bbde36d825eb1a09d5cdcd577ed8ef2f0d3731d2736bf00ef93cd6ffe17

*/


Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
---------------------------------- --------- --------- --------- ---------
/mob/verb/BigIntLargeSum_SpeedTest 0.000 0.009 0.009 1
/pif_BigInt/New 0.000 0.001 0.001 3
/pif_BigInt/proc/_GetBlock 0.000 0.000 0.000 375
/pif_BigInt/proc/_SetBlock 0.000 0.000 0.000 100
/pif_BigInt/proc/Add 0.001 0.001 0.001 1
/pif_BigInt/proc/BitLength 0.001 0.001 0.001 303
/pif_BigInt/proc/Expand 0.001 0.001 0.001 75
/pif_BigInt/proc/Expandable 0.000 0.000 0.000 3
/pif_BigInt/proc/GetBits 0.002 0.003 0.003 300
/pif_BigInt/proc/GetMode 0.000 0.000 0.000 6
/pif_BigInt/proc/IsNegative 0.000 0.000 0.000 4
/pif_BigInt/proc/Length 0.000 0.000 0.000 859
/pif_BigInt/proc/Modifiable 0.000 0.000 0.000 1
/pif_BigInt/proc/PrintHex 0.000 0.007 0.007 3
/pif_BigInt/proc/PrintHexadecimal 0.004 0.007 0.007 3
/pif_BigInt/proc/Set 0.000 0.001 0.001 3
/pif_BigInt/proc/SetMode 0.000 0.000 0.000 1

/*

0x61f9e8fce4272fbb27aab55dfcc8235553713aa0ca958dbf0b6cb83107f19be78411678e0199f01d6e81f1d6ac251da8b862 * 0x4eb837b1c294ee4a1297a1cc79a4f41f0ef84eabc12855ae76f1f96f956b40edf3dc2764ef3982ffb8b4cd2a436eafc745b5 = 0x1341b14b219241711513139183232f364478ebf5096d3810947abec172865af99035402912606d1db5cd24ac68b66de172ad

*/


Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
----------------------------------------- --------- --------- --------- ---------
/mob/verb/BigIntLargeDifference_SpeedTest 0.000 0.009 0.009 1
/pif_BigInt/New 0.000 0.001 0.001 3
/pif_BigInt/proc/_GetBlock 0.001 0.001 0.001 375
/pif_BigInt/proc/_SetBlock 0.000 0.000 0.000 100
/pif_BigInt/proc/BitLength 0.002 0.002 0.002 303
/pif_BigInt/proc/Expand 0.001 0.001 0.001 75
/pif_BigInt/proc/Expandable 0.000 0.000 0.000 3
/pif_BigInt/proc/GetBits 0.002 0.004 0.004 300
/pif_BigInt/proc/GetMode 0.000 0.000 0.000 4
/pif_BigInt/proc/IsNegative 0.000 0.000 0.000 4
/pif_BigInt/proc/Length 0.000 0.000 0.000 859
/pif_BigInt/proc/Modifiable 0.000 0.000 0.000 1
/pif_BigInt/proc/PrintHex 0.000 0.007 0.007 3
/pif_BigInt/proc/PrintHexadecimal 0.003 0.007 0.007 3
/pif_BigInt/proc/Set 0.000 0.001 0.001 3
/pif_BigInt/proc/Subtract 0.000 0.001 0.001 1

/*

0x61f9e8fce4272fbb27aab55dfcc8235553713aa0ca958dbf0b6cb83107f19be78411678e0199f01d6e81f1d6ac251da8b862 * 0x4eb837b1c294ee4a1297a1cc79a4f41f0ef84eabc12855ae76f1f96f956b40edf3dc2764ef3982ffb8b4cd2a436eafc745b5 = 0x1e20a5ed3c98bad0860364a188f7a3260de89e0d5bf19af84ef356607fe9a8a50de265271b5be86ee4e150f889c06a67add0994cce6374df1f3a1045ba90ec9afb9e891a25edaef830e8d2a9a19b189b6f36549dc3dff41b0bd5a28eaa22fb8ac42ac74a

*/


Profile results (total time)
Proc Name Self CPU Total CPU Real Time Calls
-------------------------------------- --------- --------- --------- ---------
/mob/verb/BigIntLargeProduct_SpeedTest 0.000 0.058 0.058 1
/pif_BigInt/New 0.000 0.001 0.001 3
/pif_BigInt/proc/_AddAtBlock 0.026 0.047 0.047 3027
/pif_BigInt/proc/_GetBlock 0.008 0.009 0.010 4549
/pif_BigInt/proc/_SetBlock 0.007 0.009 0.009 3599
/pif_BigInt/proc/BitLength 0.001 0.001 0.001 403
/pif_BigInt/proc/Expand 0.003 0.003 0.004 100
/pif_BigInt/proc/Expandable 0.000 0.000 0.000 3
/pif_BigInt/proc/GetBits 0.001 0.002 0.002 400
/pif_BigInt/proc/GetMode 0.000 0.000 0.000 4
/pif_BigInt/proc/IsNegative 0.000 0.000 0.000 4
/pif_BigInt/proc/Length 0.005 0.006 0.009 14740
/pif_BigInt/proc/Modifiable 0.000 0.000 0.000 1
/pif_BigInt/proc/Multiply 0.005 0.053 0.053 1
/pif_BigInt/proc/PrintHex 0.000 0.004 0.004 3
/pif_BigInt/proc/PrintHexadecimal 0.002 0.004 0.004 3
/pif_BigInt/proc/Set 0.000 0.001 0.001 3


Once I get division done, I'll be able to compute remainders and therefore can finally do conversion into decimal. It's really, really simple to convert into any base this is an integer exponent of 2 (and just because of that, I already have methods to convert to binary, quaternary, octal, hexadecimal, and base-64), but decimal is obviously not so it's not as easy to do.

Unfortunately, doing division well is probably going to be difficult because division is not as well-behaved as multiplication or addition. We'll see what ends up happening, though hopefully it doesn't take too long to work something out. Getting division done is basically the last big hurdle to documenting the library properly and getting it out.
Marketing is great. It's daresay essential to the livelihood of a game. But all the time i see too many people think about the hype first without understanding the economic science behind game announcements and trailers. It comes down to timing andbusually occurs toward the very end of a game's dev cycle, or at least once a stable, feature complete beta is done.
So much for my dreams of making a trailer for genesis without any gameplay and just words.
In response to Popisfizzy
That looks complicated af.
In response to Ghost of ET
Ghost of ET wrote:
That looks complicated af.

How?... It's just profiler output...
In response to Kats
It looks complicated to someone who doesnt know what they are looking at.

In response to Kats
Kats wrote:
Ghost of ET wrote:
That looks complicated af.

How?... It's just profiler output...

Doesn't matter what output it is, if you don't understand the syntax

Subtracting 1 + 1 + ... + 1 + 1 from 0xfffffff0 for 65,635 times in hexadecimal is 0xfffefff1


Is fucking witchcraft.
In response to Rushnut
Rushnut wrote:
Doesn't matter what output it is, if you don't understand the syntax

>
> Subtracting 1 + 1 + ... + 1 + 1 from 0xfffffff0 for 65,635 times in hexadecimal is 0xfffefff1
>

Is fucking witchcraft.

Yeah... I could do to rewrite that. It's supposed to more akin to "The result of subtracting 1 from 0xfffffff0 65,535 times, in hexadecimal, is 0xfffefff1."
what's 0xfffffff0 and why would you want to subtract 1 from it 65 thousand times????
In response to Ghost of ET
Ghost of ET wrote:
what's 0xfffffff0 and why would you want to subtract 1 from it 65 thousand times????

The 0x indicates it's a number in hexadecimal (which is standard in programming, though not elsewhere). fffffff0 in decimal is 4,294,967,280. As for why I want to do it, it's a stress test to see how well this library handles performing lots of operations in a small time frame. So far, this library is performing better than I'd expected it to.
I'll concede to that notion. Can't place any blame on someone for not knowing. It's always a good day when you learn something new. :P

Unless... I mean... you learn that your spouse is cheating on you... then it's a pretty crap day.
How does fffffff0 = 4,294,967,280 <3?
In response to Kats
Bad day =(?
In response to Ghost of ET
Ghost of ET wrote:
How does fffffff0 = 4,294,967,280 <3?

u can also do octal, 037777777760 will equal that
In response to Ghost of ET
Ghost of ET wrote:
How does fffffff0 = 4,294,967,280 <3?

In base 16 (hexadecimal), 0 through 1 are equal to their respective values in base 10 (decimal). The difference is that there are five more 'primitive' digits that are equal to 11, 12, 13, 14, and 15. These are typically labelled A, B, C, D, E, and F for convenience.

From there, it comes down to positional notation. Must like 123 'means' 1*100 + 2*10 + 3*1 = 1*102 + 2*101 + 1*100, in hexadecimal something like F1B 'means' F*162 + 1*161 + B*160 = 15*16*16 + 16 + 11 = 3,867. Therefore, FIB16 = 3,86710. It's by this logic that fffffff016 = 4,294,967,28010.
What DX?
https://en.wikipedia.org/wiki/Hexadecimal

Do some research on it. It's really useful in computational mathematics since it's far less verbose than binary.
Im changing my proffession from computer programming to book author. Life will be so much more simpler that way.
In response to Ghost of ET
Ghost of ET wrote:
How does fffffff0 = 4,294,967,280 <3?

It's base 16, so with that, A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.

From my understanding, you multiply out the numbers in their places (ex, ff = (16*15)+15, which is 230+15 = 255)
Page: 1 2 3 ... 70 71 72 73 74 ... 349 350 351