{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":94959415,"defaultBranch":"master","name":"crystal","ownerLogin":"jgaskins","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2017-06-21T03:34:14.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/108205?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1716332585.0","currentOid":""},"activityList":{"items":[{"before":"752fab7a6d9ddfb538c4bda0e7b5bc33b2b286fd","after":"f9ffa357069e435b8fb020ade9aff11f4be4d667","ref":"refs/heads/b64-encode-io-to-io","pushedAt":"2024-05-22T02:58:21.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Replace explicit Bytes.new with `.to_slice`\r\n\r\nI keep forgetting this exists\n\nCo-authored-by: David Keller ","shortMessageHtmlLink":"Replace explicit Bytes.new with .to_slice"}},{"before":"0c0fdc66ad78139136c0564417076ed95ea07e62","after":"752fab7a6d9ddfb538c4bda0e7b5bc33b2b286fd","ref":"refs/heads/b64-encode-io-to-io","pushedAt":"2024-05-21T23:06:59.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Allow passing an `IO` as the Base64.encode source","shortMessageHtmlLink":"Allow passing an IO as the Base64.encode source"}},{"before":null,"after":"0c0fdc66ad78139136c0564417076ed95ea07e62","ref":"refs/heads/b64-encode-io-to-io","pushedAt":"2024-05-21T23:03:05.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Allow passing an `IO` as the Base64.encode source","shortMessageHtmlLink":"Allow passing an IO as the Base64.encode source"}},{"before":"3cc51a345340c68cf1409b98fbc4f18115fcc744","after":"56a3ed7f6f2dfa053c0b356813c77be72d6e2f2b","ref":"refs/heads/optimize-http-header-name","pushedAt":"2024-04-19T22:11:58.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Remove obsolete comment\n\nThese are no longer order-dependent since we're using a hash now.","shortMessageHtmlLink":"Remove obsolete comment"}},{"before":"c94b341e214c34be18270770cb49e928f3d4fc49","after":"3cc51a345340c68cf1409b98fbc4f18115fcc744","ref":"refs/heads/optimize-http-header-name","pushedAt":"2024-04-19T21:54:00.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Create hash directly\r\n\r\nRather than creating the hash in 2 steps, this commit creates it in 1.\n\nCo-authored-by: Sijawusz Pur Rahnama ","shortMessageHtmlLink":"Create hash directly"}},{"before":null,"after":"c94b341e214c34be18270770cb49e928f3d4fc49","ref":"refs/heads/optimize-http-header-name","pushedAt":"2024-04-17T04:16:14.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Optimize HTTP.header_name\n\nUsing `Indexable#bsearch` operates in logarithmic time, but `Hash#[]?` operates in constant time","shortMessageHtmlLink":"Optimize HTTP.header_name"}},{"before":null,"after":"69c966a7f5294618a741e181fbf0cd5ea50c73d8","ref":"refs/heads/optimize-hash-transform","pushedAt":"2024-04-17T03:54:10.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Optimize Hash#transform_{keys,values}","shortMessageHtmlLink":"Optimize Hash#transform_{keys,values}"}},{"before":"d71150cca77ce881fdff080d19df7b7ee75c2ec7","after":null,"ref":"refs/heads/fix-mutex-on-aarch64","pushedAt":"2024-02-12T18:12:23.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"}},{"before":"4d68581c83ed2413509ed3d02079b81af8399893","after":"d71150cca77ce881fdff080d19df7b7ee75c2ec7","ref":"refs/heads/fix-mutex-on-aarch64","pushedAt":"2024-01-30T00:10:15.000Z","pushType":"push","commitsCount":3,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Merge branch 'master' into fix-mutex-on-aarch64","shortMessageHtmlLink":"Merge branch 'master' into fix-mutex-on-aarch64"}},{"before":null,"after":"4d68581c83ed2413509ed3d02079b81af8399893","ref":"refs/heads/fix-mutex-on-aarch64","pushedAt":"2024-01-30T00:07:30.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Fix Mutex on aarch64\n\nThis solution is the same as the one used in #13050.\n\nThe following code is expected to output `1000000` preceded by the time\nit took to perform it:\n\n```\nmutex = Mutex.new\nnumbers = Array(Int32).new(initial_capacity: 1_000_000)\ndone = Channel(Nil).new\nconcurrency = 20\niterations = 1_000_000 // concurrency\nconcurrency.times do\n spawn do\n iterations.times { mutex.synchronize { numbers << 0 } }\n ensure\n done.send nil\n end\nend\n\nstart = Time.monotonic\nconcurrency.times { done.receive }\nprint Time.monotonic - start\nprint ' '\nsleep 100.milliseconds # Wait just a bit longer to be sure the discrepancy isn't due to a *different* race condition\npp numbers.size\n```\n\nBefore this commit, on an Apple M1 CPU, the array size would be anywhere\nfrom 880k-970k, but I never observed it reach 1M. Here is a sample:\n\n```\n$ repeat 20 (CRYSTAL_WORKERS=10 ./mutex_check)\n00:00:00.119271625 881352\n00:00:00.111249083 936709\n00:00:00.102355208 946428\n00:00:00.116415166 926724\n00:00:00.127152583 899899\n00:00:00.097160792 964577\n00:00:00.120564958 930859\n00:00:00.122803000 917583\n00:00:00.093986834 954112\n00:00:00.079212333 967772\n00:00:00.093168208 953491\n00:00:00.102553834 962147\n00:00:00.091601625 967304\n00:00:00.108157208 954855\n00:00:00.080879666 944870\n00:00:00.114638042 930429\n00:00:00.093617083 956496\n00:00:00.112108959 940205\n00:00:00.092837875 944993\n00:00:00.097882625 916220\n```\n\nThis indicates that some of the mutex locks were getting through when\nthey should not have been. With this commit, using the exact same\nparameters (built with `--release -Dpreview_mt` and run with\n`CRYSTAL_WORKERS=10` to spread out across all 10 cores) these are the\nresults I'm seeing:\n\n```\n00:00:00.078898166 1000000\n00:00:00.072308084 1000000\n00:00:00.047157000 1000000\n00:00:00.088043834 1000000\n00:00:00.060784625 1000000\n00:00:00.067710250 1000000\n00:00:00.081070750 1000000\n00:00:00.065572208 1000000\n00:00:00.065006958 1000000\n00:00:00.061041541 1000000\n00:00:00.059648291 1000000\n00:00:00.078100125 1000000\n00:00:00.050676250 1000000\n00:00:00.049395875 1000000\n00:00:00.069352334 1000000\n00:00:00.063897833 1000000\n00:00:00.067534333 1000000\n00:00:00.070290833 1000000\n00:00:00.067361500 1000000\n00:00:00.078021833 1000000\n```\n\nNote that it's not only correct, but also significantly faster.","shortMessageHtmlLink":"Fix Mutex on aarch64"}},{"before":"67b56fabf5dc681384869300522d0b9992c4a942","after":"b619a24b8bd5dfac103a4e91eaf55374bfde6fbe","ref":"refs/heads/enum-alternative-letter-casing","pushedAt":"2024-01-12T19:24:57.000Z","pushType":"push","commitsCount":19,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Merge branch 'master' into enum-alternative-letter-casing","shortMessageHtmlLink":"Merge branch 'master' into enum-alternative-letter-casing"}},{"before":null,"after":"67b56fabf5dc681384869300522d0b9992c4a942","ref":"refs/heads/enum-alternative-letter-casing","pushedAt":"2024-01-12T19:02:58.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Add Enum#{down,snake,kebab}case_name","shortMessageHtmlLink":"Add Enum#{down,snake,kebab}case_name"}},{"before":"84322310b0a71a2a1a264d57cbd940de8b43729c","after":null,"ref":"refs/heads/patch-2","pushedAt":"2023-10-11T01:06:33.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"}},{"before":"d5b83186d89ebb7409b39bd1120aaf83919838dd","after":"84322310b0a71a2a1a264d57cbd940de8b43729c","ref":"refs/heads/patch-2","pushedAt":"2023-09-10T17:39:31.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Fix docs for `Digest::SHA512`","shortMessageHtmlLink":"Fix docs for Digest::SHA512"}},{"before":"bff4ebc19c3f1fcc4465371222d6eb2a80f01fb8","after":null,"ref":"refs/heads/optimize-io-read-string-empty","pushedAt":"2023-08-19T03:46:16.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"}},{"before":"355ff5bd087132b69a1626937d05b7aa2a650276","after":"bff4ebc19c3f1fcc4465371222d6eb2a80f01fb8","ref":"refs/heads/optimize-io-read-string-empty","pushedAt":"2023-08-08T22:26:26.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Optimize IO#read_string(0)","shortMessageHtmlLink":"Optimize IO#read_string(0)"}},{"before":null,"after":"355ff5bd087132b69a1626937d05b7aa2a650276","ref":"refs/heads/optimize-io-read-string-empty","pushedAt":"2023-08-07T03:13:12.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"jgaskins","name":"Jamie Gaskins","path":"/jgaskins","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/108205?s=80&v=4"},"commit":{"message":"Optimize IO#read_string(0)","shortMessageHtmlLink":"Optimize IO#read_string(0)"}},{"before":"7eb8f665d9282679b0043197164f1c7611667581","after":"28e08eb424d990c9d64cc4e986a7b16d2579b434","ref":"refs/heads/support-range-requests-for-static-file-handler","pushedAt":"2023-03-27T19:12:10.309Z","pushType":"push","commitsCount":2,"pusher":{"login":"straight-shoota","name":"Johannes Müller","path":"/straight-shoota","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/466378?s=80&v=4"},"commit":{"message":"Fix edge cases with empty file","shortMessageHtmlLink":"Fix edge cases with empty file"}},{"before":"0728f2a19260d00ec405208abb8ae6ee008baaad","after":"7eb8f665d9282679b0043197164f1c7611667581","ref":"refs/heads/support-range-requests-for-static-file-handler","pushedAt":"2023-03-27T16:43:05.901Z","pushType":"push","commitsCount":2,"pusher":{"login":"straight-shoota","name":"Johannes Müller","path":"/straight-shoota","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/466378?s=80&v=4"},"commit":{"message":"Fix satisfiability for empty file","shortMessageHtmlLink":"Fix satisfiability for empty file"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEUHZj3wA","startCursor":null,"endCursor":null}},"title":"Activity · jgaskins/crystal"}