ぐぐったら、末尾再帰はx64だと自動的にスタックを使用しない形してくれるらしい。 https://qiita.com/Tokeiya/items/ff2da14e2254b53278b7 qiitaの内容を読んだ限りだとBigListのInsertInPlace()とかは最適化されなさそうだけど、最近のJITは単に値を渡たす程度なら最適化してくれるようだ。 JITすごい。

唐突ですが、一回目の記事を書きます! 今回は、主にウェブサーバー、具体的にはLinuxのSO_REUSEPORT(プログラミング言語としてはC言語)の話題になります。背景として、弊社では、広告配信がいわゆるネイティブアプリケーションであるため、ウェブサーバーの開発を行っているといったことが挙げられます。そもそも今回の記事を書いたきっかけは、弊社でSO_REUSEPORTを使用し始めており、それについて紹介したいと考えたからです。 特にC10K問題については TheC10kProblem - 「C10K問題」(クライアント1万台問題)とは、ハードウェアの性能上は問題がなくても、あまりにもクライアントの数が多くなるとサーバがパンクする問題のこと が詳しいので今回は説明を省略します。 また、Linux(正確にはKernel 3.9以降)におけるSO_REUSEPORTについては、 或るプログラマ
Linux Kernel 3.9 には SO_REUSEPORT が追加されているそうです。SO_REUSEPORT でググると日本語のページの中で一番上に出てくる当blog(2013-06-02現在)としては調査しないわけにはいきません :-) Linux の SO_REUSEPORT は「TCP ソケットを完全重複 bind し、受け付けたコネクションをそれぞれのソケットに適当に割り振る」という機能のようです。これは、BSD の SO_REUSEPORT より機能が「強い」ということです(参考)。SO_REUSEADDR の時もそうですが、同じ名前で違う機能にするのやめてくれないかなぁ… 実験 SO_REUSEPORT が追加されたのは3月10日ごろのようなのですが、既に3か月たっていて Fedora 18 が Kernel 3.9 ベースになっており、試すためにソースコードからビルド
SO_REUSEPORTはLinux Kernel 3.9からサポートされている機能で、複数のプロセス/Listenerから同じTCPポートをbind可能にして、Kernelが それぞれのプロセスに接続を分散してくれるという機能です。preforkなサーバはlistenしてからworkerをforkし、それぞれでacceptを行うという手順を踏みますが、SO_REUSEPORTを使えばその手順を踏まなくても複数プロセスから同じポートをListenして処理の並列性をあげたり、hot-depolyが実現できます。 Docker のHost networking機能とSO_REUSEPORTを使って、複数のコンテナから同じポートをbindできれば、コンテナのhot-deployができるんじゃないかと思ったので、試してみました。 SO_REUSEPORTについては以下のblogが参考になります。
AI & MLLearn about artificial intelligence and machine learning across the GitHub ecosystem and the wider industry. Generative AILearn how to build with generative AI. GitHub CopilotChange how you work with GitHub Copilot. LLMsEverything developers need to know about LLMs. Machine learningMachine learning tips, tricks, and best practices. How AI code generation worksExplore the capabilities and be
How we set up a robust and scalable stack on top of socket.io For the last few months, we have been working on a completely new Storify Editor which enables real-time collaboration. Storify real-time collaborationStackThe editor is a standalone server built with Node.js and socket.io in order to have a 2-way, real-time communication between the client and the server. The goal is to push changes to
Dropbox owes a large share of its success to Python, a language that enabled us to iterate and develop quickly. However, as our infrastructure matures to support our ever growing user base, we started exploring ways to scale our systems in a more efficient manner. About a year ago, we decided to migrate our performance-critical backends from Python to Go to leverage better concurrency support and
Check out my book (free online): “Exploring ES6”. Updated version of this blog post: chapter “Maps and Sets”. Among others, the following four data structures are new in ECMAScript 6: Map, WeakMap, Set and WeakSet. This blog post explains how they work. Map # JavaScript has always had a very spartan standard library. Sorely missing was a data structure for mapping values to values. The best you c
タイトルの通りですが、12 月末で 6 年弱勤めた DeNA を退職して、1 月から AWS に Join してます。日本の Solution Architect です。初めての B2B のお仕事なので新卒新入社員の気持ちです。新卒入社時の予定ではもうアメリカに留学してるはずだったのに、どうしてこうなったのやら。。。 さて、DeNA にはエンジニア未経験の状態からここまで力を付けさせてもらって大変感謝しています。売上に直接貢献するような仕事はほとんどできなかったですが、起こらなかった問題に対する貢献は少しは出来たかなと思っています。そういえばここではちゃんと書いてなかったですが、最後の1年間は MYCODE という遺伝子解析サービスの開発をゼロから行っていて、何もないところからリリースまで辿り着くという産みの苦しみを味わうことができて非常にエキサイティングでした。ちょっとだけですが Sec
Ariya Hidayat (@ariyahidayat) is an engineer/technical lead/FOSS fan/blogger/speaker. These days, his activities are mostly on software craftsmanship around HTML5, JavaScript, and other web technologies. Everyone is fascinated with the smooth animation at 60 frames/second. It is hardly a surprise that one of the most prevalent performance advices to web developers is to use hardware accelerated CS
🏧Transfer Bank, 💶DANA, 💵Gopay, 💴Linkaja!, 💷OVO, Pulsa SBOBET Agen Judi Bola Terbesar dan Terpercaya di Indonesia 2023 Sbobet atau sbobet88 adalah nama dari sebuah provider atau pencipta jenis taruhan judi online taruhan bola, bagi anda pecinta judi bola online pastinya sudah tahu bahwa sbobet adalah tempat memasang taruhan bola terlengkap dan terpercaya. Selain menyediakan taruhan bola, sbobe
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く