CARVIEW |
Select Language
HTTP/2 302
date: Wed, 23 Jul 2025 07:41:45 GMT
content-type: text/html; charset=utf-8
content-length: 0
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
location: https://objects.githubusercontent.com/github-production-repository-file-5c1aeb/15337142/116477?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20250723%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20250723T074145Z&X-Amz-Expires=300&X-Amz-Signature=5556e29a7c6955b404a44c3edccf211443b17e328190dc8c95dc02c8829f521c&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3Bfilename%3Dmpz_bitwise.py.txt&response-content-type=text%2Fplain
cache-control: no-cache
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
set-cookie: _gh_sess=g1%2FfK6OFiTkaxC10%2Bzi0t1F8GHHCt6TePYv98T1egmH2frB14zTgmVnfZ2vPHK%2BLkewbwohLVwPc35gmiNIALHKPrQuln4MUdo%2B2SDuifO31dFs9yT27Pkdpii139NfuoWIY5f0oxmqP1L8nnRT0Pz7EnpS6L69kxjJwLkoxI6jkehga3if5PzDByRu1ZMKT5m7XgA4Kcd47Wo076iZ54hAtw45DSCXIMRHw6gL%2Bioqd8FViNta64b22EX9WvoE150JQwoxWUlm7cajsdwhlXw%3D%3D--5dZ07jpmilBsVLQK--P1gZ8Y2mnIPIAmg%2F%2BKxIRA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.2073273621.1753256505; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 07:41:45 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Thu, 23 Jul 2026 07:41:45 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: 845C:1A99C5:673865:814FAD:68809239
HTTP/2 200
content-type: text/plain
last-modified: Tue, 04 Mar 2025 00:21:16 GMT
etag: "0x8DD5AB27ADC01C8"
server: Windows-Azure-Blob/1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 37b5111e-c01e-00cf-24f2-fa19a3000000
x-ms-version: 2025-05-05
x-ms-creation-time: Mon, 03 Mar 2025 17:40:17 GMT
x-ms-blob-content-md5: 2C0TCJ+pVtTHAhXDcsp0cQ==
x-ms-lease-status: unlocked
x-ms-lease-state: available
x-ms-blob-type: BlockBlob
content-disposition: attachment;filename=mpz_bitwise.py.txt
x-ms-server-encrypted: true
via: 1.1 varnish, 1.1 varnish
fastly-restarts: 1
accept-ranges: bytes
age: 0
date: Wed, 23 Jul 2025 07:41:46 GMT
x-served-by: cache-iad-kiad7000137-IAD, cache-bom-vanm7210020-BOM
x-cache: MISS, HIT
x-cache-hits: 0, 0
x-timer: S1753256505.326087,VS0,VE282
content-length: 2045
import utime
import urandom as random
ITERS = 20000000
def run(f):
t = utime.time()
f(ITERS)
t = utime.time() - t
print(t)
vals = [
97989513389222316022151446562729620153292831887555425160965597396,
23716683549865351578586448630079789776107310103486834795830390982,
53817081128841898634258263553430908085326601592682411889506742059,
37042558948907407488299113387826240429667200950043601129661240876,
26167512042587370698808974207700979337713004510730289760097826496,
98456276326770292376138852628141531773120376436197321310863125849,
21085380307304977067262070503651827226504797285572981274069266136,
15928222825828272388778130358888206480162413547887287646273147570,
40827393422334167255488276244226338235131323044408420081160772273,
63815443187857978125545555033672525708399848575557475462799643340,
5181013159871685724135944379095645225188360725917119022722046448,
59734090450462480092384049604830976376887859531148103803093112493,
283894311,
86526825689187217371383854139783231460931720533100376593106943447,
40019818573920230246248826511203818792007462193311949166285967147,
9487909752]
def nullbench(num):
result = 1
for i in iter(range(num)):
result = vals[random.getrandbits(4)]
result = vals[random.getrandbits(4)]
# for i in iter(range(num//8)):
# result = random.getrandbits(63)
# for i in iter(range(num//16)):
# result = random.getrandbits(127)
def andbench(num):
result = 1
for i in iter(range(num)):
result = result & vals[random.getrandbits(4)] & vals[random.getrandbits(4)]
def orbench(num):
result = 1
for i in iter(range(num)):
result = result | vals[random.getrandbits(4)] | vals[random.getrandbits(4)]
def xorbench(num):
result = 1
for i in iter(range(num)):
result = result ^ vals[random.getrandbits(4)] ^ vals[random.getrandbits(4)]
random.seed(1) # start at a known, repeatable place
run(nullbench)
run(andbench)
run(orbench)
run(xorbench)