You are given a 3D grid, which has dimensions X, Y and Z. Each of the X x Y x Z cells contains a light. Initially all lights are off. You will have K ...
分类:
其他好文 时间:
2019-05-07 22:51:07
阅读次数:
148
描述 Imagine you are standing inside a two dimensional maze composed of square cells which may or may not be filled with rock. You can move north, south ...
分类:
其他好文 时间:
2019-05-02 21:27:48
阅读次数:
166
1. 值编号 我们知道C1内部使用的是一种图结构的HIR,它由基本块构成一个图,然后每个基本块里面是SSA形式的指令,关于这点如可以参考 "[Inside HotSpot] C1编译器工作流程及中间表示" 。值编号(Value numbering)是指 为每个计算得到的值分配一个独一无二的编号 ,然 ...
分类:
其他好文 时间:
2019-04-24 19:35:10
阅读次数:
157
1. 条件传送指令 日常编程中有很多 根据某个条件对变量赋不同值 这样的模式,比如: cpp int cmov(int num) { int result = 10; if(num9就为result赋1,否则赋0。正因为跳转是条件的,CPU必须要等到条件成立才执行后面的指令(即数据依赖于条件),这会 ...
分类:
其他好文 时间:
2019-04-23 22:31:22
阅读次数:
233
英文原文:Inside NGINX: How We Designed for Performance & Scale 为了更好地理解设计,你需要了解NGINX是如何工作的。NGINX之所以能在性能上如此优越,是由于其背后的设计。许多web服务器和应用服务器使用简单的线程的(threaded)、或基于 ...
分类:
其他好文 时间:
2019-04-21 09:27:56
阅读次数:
208
1. C1编译器线程 C1编译器(aka Client Compiler)的代码位于 。C1编译线程(C1 CompilerThread)会阻塞在任务队列,当发现队列有编译任务即可CompileTask的时候,线程唤醒然后调用CompilerBroker,CompilerBroker再进一步选择合适 ...
分类:
其他好文 时间:
2019-04-20 12:57:55
阅读次数:
237
论文地址:implementing Lock-Free Queue 论文大体讲的意思是:Lock-Base的程序的performance不好,并且a process inside the critical section can delay all operations indenitely;所以 ...
分类:
其他好文 时间:
2019-04-14 15:53:19
阅读次数:
131
移动端Web界面滚动性能优化 Passive event listeners 解决办法1: 在touch的事件监听方法上绑定第三个参数{ passive: false }, 通过传递 passive 为 false 来明确告诉浏览器:事件处理程序调用 preventDefault 来阻止默认滑动行为 ...
分类:
Web程序 时间:
2019-04-13 01:10:46
阅读次数:
461
测试题 0.如果希望在函数中修改全局变量的值,应该使用什么关键字? 答:globe 1.在嵌套函数中,如果希望在内部函数修改外部函数的局部变量,应该使用什么关键字? 答:nonlocal 2.python的函数可以嵌套,但要注意访问的作用域问题哦,请问以下代码存在什么问题呢? 答:inside() ...
分类:
编程语言 时间:
2019-04-08 01:02:05
阅读次数:
563
引用参考:https://segmentfault.com/a/1190000017273573?utm_medium=referral&utm_source=tuicool http://www.cnblogs.com/lhb25/p/inside-block-formatting-ontext. ...
分类:
其他好文 时间:
2019-03-20 17:18:18
阅读次数:
157