Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- CPU bound



  32-bit vs 64-bit

I have knowledge on 32-bit vs 64-bit, but not very clear minded. Here is a good article I found about it. http://www.techsupportalert.com/content/32-bit-and-64-bit-explained.htm   Understand there are 3 things involved: CPU, OS and application. To work on 64-bit, first thing first is: you need a 64-bit CPU. 64-bit CPU usually provide emulation for 32-bit system. Though some 32-bit application still cannot run on 64-bit OS, because they might contain 16-bit code. 32-bit system won't have com...

       2015-12-08 03:04:01

  How to use Chome dev tool to find event handler bound to an element

As a front end developer, there is frequent need to debug JS code and sometimes need to find out what event handler has been bound to a HTML element. In this post, we will show how to find out the click event handler bound to a HTML element, this same applies to other events as well. Nowadays, a web application is usually very complicated and there are lots of JS codes which makes it difficult to find out what click event handler has been bound to a HTML element, especially when the JS source co...

   JAVASCRIPT,CHROME,CHROME DEV TOOL,EVENT LISTENER     2019-08-17 22:14:36

  Why Apple Mac switches its CPU? The war between Intel and ARM

About three months ago, the new iPad Pro was released and it supports touch pad and mouse. It conveys a clear message to users that they want people to treat iPad Pro as a laptop.  As we know, iPad and iPhone are both using iOS, if iOS can run on laptop,  it means MacOS and iOS can merge and become a unified OS. And if Mac and iPhone can share the same OS, it means the same app can run in all places. It is becoming clearer and clearer that Apple is planning to do this exact thing. Late...

   APPLE,INTEL,ARM,WWDC,A14     2020-06-20 00:19:02

   Python – parallelizing CPU-bound tasks with multiprocessing

In a previous post on Python threads, I briefly mentioned that threads are unsuitable for CPU-bound tasks, and multiprocessing should be used instead. Here I want to demonstrate this with benchmark numbers, also showing that creating multiple processes in Python is just as simple as creating multiple threads. First, let’s pick a simple computation to use for the benchmarking. I don’t want it to be completely artificial, so I’ll use a dumbed-down version of factorization...

   Python,Multitasking,Multiprocessing,CPU bound     2012-01-17 11:38:22

  Practice of using spinlock instead of mutex

Spinlock and mutex are two important concepts in multithreading programs. They are used to lock some shared resource to prevent concurrent access which may affect data consistency. But they do have differences, what are the differences? when should we use spinlock instead of mutex? The Theory In theory, when a thread tries to lock a mutex and it does not succeed, because the mutex is already locked, it will go to sleep, immediately allowing another thread to run. It will continue to sleep until...

   Spinlock,Mutex,Concurrency     2014-04-19 21:54:12

  How Many C Programs Are There?

If I choose a size S, can you tell me how many valid C programs exist that are no larger than that size? I’m actually interested in the answer — it’ll help me make a point in a paper I’m writing. Shockingly, the Internet (or at least, the part of it that I looked at based on a few searches) does not provide a good answer. Let’s start with a few premises: Since it would be exceedingly difficult to construct the exact answer, we’re looking for a respe...

   C Progra,Number,Statistic,Calculation     2012-02-22 05:18:32

  Flash, HTML5 comparison finds neither has performance advantage

A comparison of streaming video via the Adobe Flash and HTML5 formats with numerous different browsers on both Mac and Windows produced wildly different results based on the operating system and browser, making neither a clear winner. The test, from Streaming Learning Center, was conducted in response to recent comments alleged to have been said by Apple co-founder Steve Jobs, in which he reportedly called Flash a "CPU hog." While the test found that HTML5 is significantly more efficient th...

   html5,flash,performance,comparison     2011-07-01 10:08:00

  How does GoLang know how many CPUs to use?

When running lscpu command on Linux, it will list the CPU info on the machine. Take one example where there is one CPU with 2 cores and each core has two threads which indicates there are 4 cores available. Now let's see how many cores GoLang program would identify. From output, NumCPU and GOMAXPROCS both output 4 which is expected. How does go runtime get this info, does it get it through similar command like lscpu or /proc/cpuinfo? Let's dig more in GoLang's source code. In runtim...

   GOLANG,CPU,NCPU     2020-12-29 23:22:15

  Python threads: communication and stopping

A very common doubt developers new to Python have is how to use its threads correctly. Specifically, a large amount of questions on StackOverflow show that people struggle most with two aspects: How to stop / kill a threadHow to safely pass data to a thread and back I already have a blog post touching on these issues right here, but I feel it’s too task-specific for sockets, and a more basic and general post would be appropriate. I assume the reader has a basic familiarity with Pytho...

   Python,Multithreading,Communication,Synchronize     2011-12-28 07:38:32

  New Android simulator has some big improvements

Message from the Android developer blog, the Android emulator now has a number of improvements and optimizations. It allows developers to develop applications more conveniently.The Android emulator is an important tool for Android developers developing and testing applications. Due to the rapid growth of Android hardware, the simulator has been slightly left behind. The new simulator brings some new functions including support for GPU, the CPU acceleration sensor support, multi-touch input suppo...

   Android, Simulator,GPU,OpenGL     2012-04-10 13:02:31